Blog Sections Open
Using IF with Ditto Placeholders in Evolution CMS
If the IF snippet keeps returning false for Ditto placeholders, the real issue is usually parsing order, not the comparison operator.
This donor case is a good reminder that placeholder-driven logic in Evolution CMS depends on when each piece of output is parsed. Ditto may already know the total number of pages, but IF cannot compare that value correctly if the placeholder has not been resolved at the moment the condition runs.
Example Pattern
[!Ditto? &tpl=`news_tpl` &parents=`2` &id=`cat` &paginate=`1` &display=`3`!]
[!if? &is=`[+cat_totalPages+]:is:1` &then=`true` &else=`false`!]
Why It Fails
- The placeholder belongs to Ditto output.
- The IF call may be evaluated before the placeholder becomes a final value.
- Numeric comparisons such as
>=or<=fail for the same reason.
Safer Approaches
- Move the condition into a later parsing stage.
- Let Ditto expose the needed markup directly through templates or wrappers.
- Store the placeholder into a structure that is rendered after Ditto pagination has been built.
The rule is simple: if a placeholder comes from a listing snippet, any logic that depends on it must run after that listing has already populated its placeholders.
Reordering menuindex Automatically Inside a Parent Resource
How to stop editors from manually renumbering menu positions one by one and design a safer bulk ordering workflow.
Restoring the Internal Link List in TinyMCE for Evolution CMS
Troubleshoot the missing internal link list in TinyMCE so editors can insert document links from the manager again.