We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 17775
    • 9 Posts
    In my Template, I have this Snippet that takes a Template variable that has a Chunk.


    [[mySnippet? &param=`[*myTv*]`]]
    


    Within [*myTv*], I have a chunk name {{myChunk}}, which just has a bunch of text and special characters. Is there a way I can apply HTML entities to my Chunks before I send it off to a Snippet? I have been trying to apply htmlentities($param) within my snippet, but it doesn’t seem to work. Any ideas?
      • 3749
      • 24,544 Posts
      If the TV contains nothing except the chunk, you could put just the name of the chunk in the TV. Then in the snippet, you could use $modx->getChunk($myTV) and run the result through htmlentities().
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting