We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37059
    • 368 Posts
    Quote from: Mark at May 19, 2011, 02:38 PM

    Tada!
    http://rtfm.modx.com/display/revolution20/Tag+Syntax#TagSyntax-Commenttags

    I’m impressed smiley But look at this from a new user’s point of view. "Hmm, this is an unofficial hack... maybe I’d better not use it until it’s officially supported." I can easily imagine someone thinking that way.
      Jason
      • 18373 ☆ A M B ☆
      • 3,141 Posts
      Hmm, I personally doubt it. I can’t read minds obviously, but if they’re looking for comment tags I expect them to be happy when they find it.

      If Jason or Shaun popped in on this convo and say it’s now the official comment tag, would that satisfy those users that in your opinion would?



      And then again, what do they lose if they don’t use it? I like my templates & chunks clean smiley
        Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

        Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
        • 37059
        • 368 Posts
        You may be right and it’s no big deal to me, I just think it couldn’t hurt to have it in the official list of tags. If it had been there when I first started using MODx, I would have known about it sooner than I did and started using it.

        Why not make it official when it already works? smiley
          Jason
          • 12512
          • 42 Posts
          There is one technical reason to properly support it.

          On a cached page, all cached snippets and chunks are replaced with their value. But the unknown [[# comment]] tag not, so it is parsed (and discarded of course) on every page request.

          If the comment tag would be supported by the core, the comment would be removed and would not appear in the cached pages offering a slight performance benefit.
            • 18373 ☆ A M B ☆
            • 3,141 Posts
            I have not tested it, so I assume you have, but my expectation is that (since you’re also calling it cached) it just gets removed before putting it in the cache....

            If you have tested that, you may want to make sure that’s added to the bug report so that is taking into consideration.
              Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

              Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
              • 12512
              • 42 Posts
              Mark, I checked the content of the .cache.php file and it is visisble in the ’_content’ element.
                • 14883 ☆ A M B ☆
                • 450 Posts
                Just realized this thread hadn't been updated, even though it is referenced in the RTFM page that describes Comment Tags.

                As of MODX Revolution 2.2 any tag found that starts with a dash (-) is ignored by the parser, and any tags it includes will be silently discarded. Before that, you can use the same however any tags within the commend would be parsed and it would be a tad more resource intensive to do so.

                http://rtfm.modx.com/display/revolution20/Tag+Syntax#TagSyntax-Commenttags

                Yay Comment Tags!!