We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 29697
    • 24 Posts
    i wrote a php script in the source code of page content.
    when i ok’d it the editor totally screwed up the code

    What gives?
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      A: You do not put php code in the page content. The page content itself is parsed directly by the MODx parser and the php code will not be evaluated. That is what snippets and TVs are for.

      B: The RTE (Rich Text Editor) will often be overly "helpful" and convert special characters to tags and vice versa. If your page requires special characters and tags, set it to not use Rich Text editing.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 29697
        • 24 Posts
        OK thanks

        Do you plan to improve the snippets docs soon cos they are very sketchy at the moment. especially the online docs
          • 11413
          • 203 Posts
          i think personally that the documentation tell you most of what you have to know. The forum is there to fill the gaps!
            Blaise Bernier

            www.medialdesign.com - Solutions for small business, hosting, design and more!
            • 29697
            • 24 Posts
            Quote from: grunt_lord at Mar 16, 2006, 07:35 PM

            i think personally that the documentation tell you most of what you have to know. The forum is there to fill the gaps!
            that is a matter of opinion
            not everyone does everything the same way
            Forums are all very well but it’s like looking for a needle in a haystack to find what you want.
            you must have a lot of free time to read all of the forum topics
              • 11413
              • 203 Posts
              It’s sure that everybody has its opinion, but as the answers usually come so quickly when asked correctly that it should not cause a problem... if you don’t get answered it’s because you’re making a path for the others and you’re gonna help newcomers to that way.
                Blaise Bernier

                www.medialdesign.com - Solutions for small business, hosting, design and more!
                • 28042 ☆ A M B ☆
                • 24,524 Posts
                The whole point of any CMS or other template-driven framework is to completely separate content from layout from presentation from behaviour from business logic. So our documents are for content, templates are for layout, CSS files are for presentation, js files are for behaviour, and in MODx snippets/TVs are for business logic (back-end server heavy lifting, like database access). Chunks are just for convenience in handling blocks of layout and/or content. TVs are actually pretty flexible, and can act as dynamic chunks and/or snippets.
                  Studying MODX in the desert - http://sottwell.com
                  Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                  Join the Slack Community - http://modx.org