YAMS 1.1.5 alpha is finally here. A lot of effort has gone into improving performance and stability with this version. This should be very noticeable for sites with lots of large Ditto and Wayfinder calls.
Here are the most important things to note about this version:
- YAMS no longer needs to be active on the OnWebPageComplete event.
- If using the PHx plugin it may be necessary to edit the plugin and change the include line to
if ( ! class_exists( 'PHxParser' ) )
{
include_once $modx->config['rb_base_dir'] . "plugins/phx/phx.parser.class.inc.php";
}
to avoid PHP complaining that the PHxParser class has already been defined.
- There is now a special placeholder ((yams_data:docid:tvname)) that will grab the content of a template variable from a given document. This is designed for internal use by YAMS, but if you wanted to use lots of them in place of something like the GetField snippet then it should be safe and efficient to do so. YAMS will analyse the document for such placeholders and evaluate them in such a way as to minimise the number of mysql queries required.
- The [[YAMS? &get=`content` ... ]] snippet call is now deprecated and may be removed in a future version. It has now been replaced by an equivalent [[YAMS? &get=`data` ... ]] snippet call which uses the new ((yams_data)) placeholder. The Ditto extension and Wayfinder templates have been updated to use the new snippet call and placeholder too.
- Also modified the YAMS-ified breadcrumbs snippet so that it works more efficiently using the new ((yams_data)) placeholder.
- The server config has been updated. It is no longer necessary to include the yams_lang query param. There are also instructions for performing permanent redirects from mysite.com/root to mysite.com/root/
- It is now possible to use YAMS placeholders in the parameters of cacheable snippet calls. So, [[Ditto? &language=`(yams_mname)` ... is allowed.
- The bug which would cause Ditto/eForm etc. to claim that they can’t find the language file has been fixed.
- It is no longer necessary for the monolingual server name to be different to the multilingual server names when in server name mode. So:
http://www.mysite.com/ - monolingual
http://www.mysite.com/ - english (default)
http://de.mysite.com/ - german
is possible.
- It is now possible for one of the root names to be empty when in root name mode. So, the following is allowed:
http://www.mysite.com/ - monolingual
http://www.mysite.com/ - english (default)
http://www.mysite.com/de/ - german
Paul