-
- 2 Posts
Hi,
Just looking at MODx on my local machine {TextPattern - seems to fall over too easily}.
Question:
I have created a new page and have used html tags in the MODx editor - the published page just shows the exact code - ie not rendered in html.
Obviously, I am not creating the MODx way!
Can anyone point me in the right direction, please?
Cheers!
Mike
-
- 680 Posts
There are a couple of reasons this could happen. My first guess would be that the Content Type (in the Page Settings tab) was set to text/plain. It could also possibly be dependent on the Template you are using.
If it’s not being caused by the Content Type, would you mind posting the source of one of your pages so that I can give it a look?
-
- 141 Posts
Hi Mike.
It would appear that you are indeed not ’doing it the MODx way’.
By default, when creating/editing a page the page contents input area uses a rich text editor, similar to a word processor. Things like headings, font characteristics, lists etc. are effected using a toolbar at the top of the edit area. It is not possible to directly enter HTML.
There are 3 ways (that I can think of) to enable you to do this:
1. You can turn off RT editing for the page. This is a checkbox somewhere near the top of the page, I believe (I am typing this from memory). this will give you just a plain text area which you can use for HTML.
2. There is a button somewhere in the toolbar which will open another window contaning the HTML equivalent of whatever is in the RT window at the time. You can then edit this and save it. The changes will be reflected back into the RT area.
3. You can write HTML into a named ’chunk’ (manage resources/chunks from the main menu). This can then be referred to from the page contents as {{chunkname}} using either the RT or the plain text editor. The HTML will then be insrted into the page at that point when the page is rendered.
Hope this helps.
-
- 2 Posts
Thanks for the rapid feedback.
Yep - the simplest way is to view the source in the editor.
Thanks again.
Cheers!
Mike