We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10365
    • 11 Posts
    this one is a tricky one.
    I am putting together a little knowledge base about MODx using... MODx and I need to display specific info for example about chunks (example).
    I add to [*content*] the followings:

    <p>To add a chunk to your page, simply create one... there... then add in your template:</p>
    <pre>
    {{chunk-name}}
    </pre>
    <p>Bla bla bla</a>


    The thing is I get an empty <pre> block (easy to understand why smiley ) which is quite useless for the ones reading the post willing to learn how MODx chunk stuff works...
    (something like Smarty’s <literal> thingie...? perhaps?)
    huh
      • 22303 MODX Staff
      • 10,725 Posts
      As a quick, simple solution, you can simply put some comment tags in between those symbols...

      {<!-- chunk -->{CHUNKNAME}<!-- chunk -->}
        • 10487 MODX Staff
        • 1,535 Posts
        Hi gaborg,

        I created this plugin a while ago that allows you to use the format that OpenGeek has mentioned but ensures that if people copy and paste the calls then they won’t break when parsed because of hidden comment tags.

        Hope it helps in someway,
        Garry
          Garry Nutting
          Senior Developer
          MODX, LLC

          Email: [email protected]
          Twitter: @garryn
          Web: modx.com
          • 10365
          • 11 Posts
          I’ve found out this.
          Does the job... for me, at least smiley

          http://modxcms.com/NotParseMODXTags-1547.html

          The plugin simply do not render MODx tags if found inside <pre> tags.
          Exactly what I wanted!