YAMS + Ditto + PHx

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

How can I use PHx and YAMS placeholders within Ditto templates?

First make sure that you have the PHx plugin installed and that its events are set to activate AFTER YAMS. Then, following thomasd's instructions, we do the following:

Turn off Ditto PHx-Substitution via &phx=`0`. Now, no PHx is done so you have to modify your PHx-tags.

For Example:


should be changed to:


Now the parsing order is correct:

  1. Ditto replaces the [+id+]-placeholder with the current id
  2. YAMS replaces the ((..))-construct with the actual content
  3. PHx executes the striptags-function and outputs the modified content

For non-multilingual fields like an image-field use:


That forces PHx to parse the Ditto-Placeholder.

The final Ditto call may look like this:

&noResults=`No Results Available`

Suggest an edit to this page.