Liquid Markup
<liquid-markup> is a special kind of tag that is only valid inside HTML content fields. Markup inside of the <liquid-markup> and </liquid-markup> tags will be evaluated before being output to the template. There are a few things to be aware of before using this tag, however:
- The template code can be hidden from the wysiwyg editor by using <liquid-markup protected>. Users will still be able to edit the code in source mode, though.
- Due to limitations of the HTML editor, the <liquid-markup> tag cannot contain any nested tags - or anything that looks like a nested tag. If the HTML editor thinks that it does contain a nested tag it will fail (unless it is protected - see above).
- You can use any content inside a <liquid-markup> tag, but if you use < and > signs you should leave a space around them to prevent the editor from mistaking them for opening and closing tags (see previous point).
- Do not attempt to use HTML-encoded entities inside an unprotected <liquid-markup> tag. The editor will automatically un-encode them and you will become frustrated. Double-encoding does not help. If you need to output html-encoded entities (eg: &, <, ", etc...), either do it outside of the <liquid-markup> tag or make it protected.
- Do not use the {% raw %} ... {% endraw %} liquid syntax inside a <liquid-markup> tag. Close the tag instead. Alternatively, utilize the {% literal %} ... {% endliteral %} syntax.
- You can have multiple <liquid-markup> tags inside a content area if needed (eg: <liquid-markup>{% if test %}</liquid-markup><div>The {% tags do someting special</div><liquid-markup>{% endif %}</liquid-markup>).