So you started using
MODX, fell in love, and started blogging about it? You went to display some
MODX code on your blog post and instead of displaying correctly it was parsed. Your output resulted in either nothing or something unexpected. Uh oh.
There are a few work arounds to this problem. Garry Nutting has a plugin to prevent
MODX tags from parsing.
Another work around is to give in and let the
MODX parser do it's thing. To satisfy the parser, we wrap the tag we would like to escape. Create a new
Chunk with the following code:
You can then echo
MODX tags without parsing them. For example:
<p> [[$esc? &input=`$my-chunk`]] </p>
We can even get real crazy with nesting MODX tags. For example:
[[$esc? &input=`$my-chunk? &p=`[[$esc? &input=`$other-chunk`]]``]]
That's enough entities for the day. We should stop. You may also want to check out the
tag Output Filter.