YAMS + Jot

This is a user-contributed Extra. If you find issues or would like more info or help, please contact the author.

How can Jot be made to work with YAMS?

Go to Resources / Elements => Snippets => Jot

Modify the second and third lines of the Jot snippet code to make them look like follows:

include_once($modx->config['base_path'] .'assets/modules/yams/class/yams.jot.class.inc.php');
$Jot = new CJotYAMS;

If Jot placeholders are being used, then it will be necessary to specify the &tagid parameter as follows:

[!Jot? &tagid=`(yams_id)` … !]

This will prevent multiple language versions of the placeholders from interfering with each other.

To use mutliple language versions of the jot templates, it will first be necessary to find or translate templates for each required language. The forums are a good place to start searching. Then for each template, copy and paste it into a new chunk.

Use a naming convention that ends in the language group id. Then add something like the following to the snippet call (uncacheable):


If it is necessary to translate text within the &validate parameter or elsewhere in the snippet call then it can be done as follows:

&validate=`email:[[YAMS? &get=`text` &from=`en::Invalid email address||de::Ungültige Email-Adresse`]]:email,content:[[YAMS? &get=`text` &from=`en::Please enter a comment.||de::Bitte schreiben Sie einen Kommentar.`]]`

Suggest an edit to this page.