We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 20054
    • 21 Posts
    I’ve written a little snippet and I want to have a page documenting it. But when I demonstrate the usage, modx picks it up and runs it! How do I stop this only in this location?
      • 25663 MODX Staff
      • 12,272 Posts
      Write the snippet out like this:
      [<!-- -->[Snippet?param=`foo`]<!-- -->]

      When HMTL rendering engines do their thing the empty comments will disappear on display, but won’t match the pattern matching of the parser.
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 20054
        • 21 Posts
        Thanks, that did the trick!

        Incidentally, the snippet and documentation in question can be found here: http://hol.net.nz/blog/my-first-modx-snippet