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?
-
☆ 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.
OK thanks
Do you plan to improve the snippets docs soon cos they are very sketchy at the moment. especially the online docs
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!
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!
-
☆ 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.