We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 49347
    • 7 Posts
    Hello! I would like to output some value without parsing it's value.
    For example if I write [[*content]] and content have some tagged text like [[+somefield]] as output I want to get text [[+somefield]] but not parsed value of this tag.
    There's internal ":tag" filter that works with tag itself, but not it's output.
    So, how to prevent further tag parsing?
      • 3749
      • 24,544 Posts
      There are several different ways to approach this. Can you say some more about where the tags are (for example, are they all in the 'content' field of the resource?).

      It would help a lot to know why you want to do this, and exactly when you want your code to execute (when someone visits a page -- before the page is rendered, for example)?
        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
        • 49347
        • 7 Posts
        Quote from: BobRay at Feb 04, 2015, 09:20 PM
        There are several different ways to approach this. Can you say some more about where the tags are (for example, are they all in the 'content' field of the resource?).

        It would help a lot to know why you want to do this, and exactly when you want your code to execute (when someone visits a page -- before the page is rendered, for example)?

        I wish to put unparsed tags in documentation (content field), so they would be seen as is. It assumed that no code in *content also would be parsed and executed.
          • 3749
          • 24,544 Posts
          You can install the FixedPre extra and wrap anything you want displayed as-is in tags like this:

          At the site in my sig. I use it for single tags:

          <fixedpre>[[!SomeTag]]</fixedpre>
          


          For code blocks, I use FixedPre and SyntaxHighlighter together:

          <pre class="brush: html; toolbar: false;"><fixedpre>
          [[getResources?
             &parents=`0`
             &tpl=`myTpl`
          ]]
          </fixedpre></pre>


            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