YAMS 1.1.7 alpha RC 2 is now available for download. Please note that the YAMS module system events have been updated again. YAMS now needs to be active on OnBeforeDocFormSave instead of OnDocFormSave, and also needs to be active on OnLoadWebPageCache if it is not already.
As well as some bug fixes, there are several new features in this version:
-
ManagerManager 0.3.4 Compatibility
-
Automatic generation of multilingual aliases based on the pagetitle on doc save (if the ’Automatically generate alias’ friendly URL parameter has been set)
-
Checking for duplicate aliases (if the ’Allow duplicate aliases’ friendly URL parameter has been set to ’no’). The checking is done on a language by language basis. This will either generate warnings or update the aliases to make them valid depending on friendly URL settings.
-
Checking for unique aliases (if the YAMS Unique Multilingual Aliases setting has been set). This is similar to checking for duplicate aliases, except that the check occurs across languages. This too will either generate warnings or update the aliases to make them valid depending on friendly URL settings.
- By default the
stripAlias function or
OnStripAlias event is now called on multilingual aliases to mimic MODx’s default behaviour for standard aliases. With MODx Evo the transalias plugin is typically active on the OnStripAlias event. Please note however, that, while you might want to use stripAlias for search engine friendliness - it is not an obligation with YAMS. You can include whatever characters you like in the aliases - including multibyte characters - if you wish and YAMS will generate correctly encoded URLs. There is an option under ’Other Params’ to switch off the stripAlias functionality for multilingual aliases if you wish.
- There is now a
mime-dependent suffixes option, that will choose a suffix based on the document content-type, defaulting to the value specified in the friendly URL settings if the content type is not recognised. YAMS currently recognises the following content-types:
'application/xhtml+xml' => '.xhtml'
, 'application/javascript' => '.js'
, 'text/javascript' => '.js'
, 'application/rss+xml' => '.rss'
, 'application/xml' => '.xml'
, 'text/xml' => '.xml'
, 'text/css' => '.css'
, 'text/html' => '.html'
, 'text/plain' => '.txt'
Currently the only way of modifying this mapping is to edit the config.inc.php file, but I’d be happy to make this configurable via the module interface if someone requires it.
I think that all this multilingual alias functionality is pretty stable now. My plan is to check that this version works for everyone, fixing any bugs as necessary, but not making any more major developments. This will then be released as a beta version and will be added to the MODx repository. It’s about time there was a new official version.