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.
should be changed to:
Now the parsing order is correct:
- Ditto replaces the
[+id+]-placeholder with the current id
- YAMS replaces the
((..))-construct with the actual content
- 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:
[[Ditto? &parents=`[*id*]` &tpl=`@FILE:assets/templates/list-item.html` &noResults=`No Results Available` &phx=`0` ]]
Suggest an edit to this page.