YAMS Configuration
Last edited by JP DeVries on Aug 9, 2013.
YAMS Configuration Options
The following tables document the options available for configuring YAMS.
Multilingual Aliases
URL Redirection Settings
Name | Choices\Example | Description |
---|---|---|
Redirection Mode |
|
Controls redirection when a page request is not associated with a valid multilingual URL. Prior to making a page multilingual page it may have been situated at the site root. For example: http://www.example.com/example.html
|
Status Code for Redirection to Pages in the Default Language |
|
The HTTP status code to use when performing the redirection described above to pages in the default language. Choose temporary if just experimenting with YAMS. Once certain, this can be switched to permanent. |
Status Code for Redirection to Pages in Non-Default Languages |
|
The HTTP status code to use when performing the redirection described above to pages in non-default languages. I suggest See other (303), since "the new URI is not a substitute reference for the originally requested resource.". |
Status Code for Change of Language |
|
The HTTP status code to use when performing a redirection in response to a request for the same page in a different language. |
MODx URLs |
|
Under normal circumstances YAMS will redirect MODx friendly URLs and URLs of the form index.php?id=... to the multilingual alias version of the URL for SEO friendliness. However, there may be occasions where it is preferable that YAMS accepts the old MODx form of the URL without redirection. This could occur when dealing with non-YAMS aware snippets and plugins.
A comma separated list of document ids for which the standard MODx form of the URL will be accepted without redirection can be specified here. * can be used to represent all documents. Note that when using this option language information is lost from the URL and so a language cookie will be used to keep the document in the same language as the last page visited. |
Document Layout Settings
Most of these settings require that ManagerManager is installed and that the YAMS specific rules are configured first.
URL Formatting
Name | Choices\Example | Description |
---|---|---|
Use MODx stripAlias |
|
Whether or not to use call the OnStripAlias event (or to call the stripAlias function on older versions of MODx) on multilingual aliases. The OnStripAlias event is normally pre-configured to convert the aliases to be lower-case, to include latin-characters only and to be dash-separated with no spaces, which used to be more search engine friendly. However, YAMS will correctly encode multibyte characters in aliases, so if you want to make use of that functionality then the MODx stripAlias functionality can be switched off here. |
Use Mime-type dependent suffixes? |
|
Whether or not to use alias suffixes which are dependent on the document mime/content type. If yes, then friendly URL suffix becomes the default should no matching mime-type be found. The mapping between mime types and suffixes is defined within the yams.config.inc.php file. If necessary, this can be edited manually, but please take care and take a back up first, since an error here could break your YAMS installation |
Site start filename |
|
Whether or not to include the filename (alias) of the site_start document in URLs created using the yams_doc and yams_docr placeholders. |
Containers as folders |
|
The final document in an URL is normally considered to be a file and is formatted as {prefix}{alias}{suffix }. If this option is switched on then documents which are containers will instead be formatted as {alias}/ |
Confirm Language Param | eg: yams_lang | The name of the GET param that can be used to confirm to YAMS what the language of the current document should be. The mod_rewrite rules in the htaccess file normally set this automatically to the language group id based on the request URL.
EasyLingual users don't user server name mode or root name mode. Instead this query parameter should be used to specify the document language. The query param should be tagged on to the end of every document URL using a placeholder. (The (yams_doc) and (yams_docr) placeholders can be used to create a full URL that is valid across all configurations.) EasyLingual usually employs lang as the name this param.
The name of this GET param can be accessed using the (yams_confirm) placeholder. |
Change Language Param | eg: yams_new_lang | The name of the GET or POST param that should be submitted when the user wants to stay on the same page but change language. This cannot have the same value as the query parameter used to confirm the current language. The value of the POST/GET should be set to the language group id.
The name of this GET/POST param can be accessed using the (yams_change) placeholder. |
MODx Subdirectory | eg: sub1/sub2 | If MODx is installed into/configured as active within a subdirectory, eg: http://www.example.com/sub1/sub2/index.php
, then this parameter should be set to the subdirectory path: sub1/sub2 with no trailing or leading slash. In future versions of YAMS this parameter will probably be removed and determined automatically. |
URL Conversion Mode |
|
Controls automatic conversion of standard MODx internal URLs to valid multilingual URLs. For example, a standard MODx internal URL might be expressed as [(site_url)][\~2\~] which might resolve to http://www.example.com/doc-2-alias.html
. Automatic URL conversion would replace this by a YAMS placeholder of the form .
|
Easylingual Compatibility
This was originally included to help people using Easylingual try YAMS, but I don't think anyone is actually using (or has ever used!) this. For that reason, I will probably remove this feature from YAMS in a future version. Please contact me via the YAMS forums if you don't want me to do that.
Name | Choices\Example | Description |
---|---|---|
Easylingual Compatibility Mode |
|
Whether or not to activate EasyLingual compatibility mode. In this mode, EasyLingual placeholders are accepted. |
Suggest an edit to this page on GitHub (Requires GitHub account. Opens a new window/tab).