Generally, but depending on the complexity, Output Filters.
shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect |
github |
splittingred.com
Ok, thanks. In the future I will use output filters instead of if-snippets if it is possible and not too complex...
-
MODX Staff
- 10,725 Posts
FWIW, both can be a problem because ALL the nested tags are processed before the outer tag is ever evaluated. Depending on what those nested tags are, you can create some major inefficiencies without realizing it. This is why it is better to encapsulate conditional logic within a Snippet tailored for the task at hand whenever possible, rather than passing then and else to a generic conditional Snippet (or output filter modifier).
-
☆ A M B ☆
- 3,141 Posts
A third option is the Switch snippet when you’re testing against different values:
http://www.modx.com/extras/package/switch