How can Ditto be made to work with YAMS?
A YAMS extender has been written for ditto which allows existing ditto templates containing basic placeholders to work with multilingual documents. The correct language content will be pulled in depending on how the output is being viewed.
To use the ditto extender the following must be carried out:
must be added to ditto calls. This will automatically replace normal placeholders like
[+pagetitle+]with multilingual ones.
If the snippet call is runnning as uncacheable (
[!Ditto? …) add
to the Ditto snippet calls and prefix the names any ditto specific placeholders with
(yams_id)_. For example, when using pagination it will be necessary to use
If the snippet call is runnning as cacheable (
[[Ditto? …) then place once copy of the snippet call in each language tab of the document and add
&id=`id` &language=`language file name`
to each snippet call, where id is to be replaced by the language group id of the language and language file name is to be replaced with the name of the relevant language file. Also prefix the names any ditto specific placeholders with id_.
For example, when using pagination it will be necessary to use
Note that YAMS works by embedding multiple language versions of the content in a single template. Therefore it is important to remember to use the &id parameter to ensure that the multiple Ditto calls and placeholders embedded in the templates do not interfere with each other.
Suggest an edit to this page.