- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
โ07-11-2019
01:10 AM
Replace legacyIf after migration from v4 to v5?
What will be syntax of this function for version 5?
<CMS_FUNCTION name="legacyIf" resultname="global_trim_level">
<CMS_VALUE_PARAM name="conditionVar" value="Global.preview"/>
<CMS_PARAM name="compareValue" value="1"/>
<CMS_CDATA_PARAM name="trueValue">4</CMS_CDATA_PARAM>
<CMS_CDATA_PARAM name="falseValue">4</CMS_CDATA_PARAM>
</CMS_FUNCTION>
Labels
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
โ07-11-2019
05:14 AM
Since the "if" here is not needed (both cases are equal), you could simply write $CMS_SET(global_trim_level, 4)$. Generally you can use CMS_IF as replacement for "legacyIf".
[Corrected, replaced CMS_VALUE with CMS_SET - thank you @ felix.reinholdโ]
Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
โ07-12-2019
03:11 AM
Small addition: I think Peter accidently wrote CMS_VALUE but meant CMS_SET

