-
- 433 Posts
Hi all,
Just wondering what would be the best way of achieving the following:
Have the right hand column change content depending on the page the user is on. So, for home, in the right column have 3 images, on the contact page, have the postal address, on the portfolio page have a case study in the right column etc. etc.
Hope somebody can help, I am wondering if TV’s would be the way, just not 100% sure how to get about implementing this.
Thanks
Lee
Make your column’s content a TV, perhaps named "rightColumn". Then for each document you can edit it, just as you do its "content".
-
- 433 Posts
Went into the new TV dialog box and I am confused. Exactly where would I add the 3 different types of content for the right column and how do I call this content from a particular page? Would I need to create a separate TV for each column.
Sorry for the dumb question, started using modxcms properly last night and just getting to grips with it at the minute.
Thanks
Lee
When you create the TV, just use the "default content" and put whatever you want as "default", or even leave it blank. Make its Input type be "textarea", or "rich text" if you favor that. Give it a name, and if you like a description. Ignore everything else. Make sure to check the template at the bottom so documents using the template will have the TV.
Now, every document using that template will have another field below its "Document content" field. Initially it will contain whatever you put in the TV’s "default content" field. There are any number of things you can do with it, but at its simplest just put the HTML code and text you want to use, or chunks and snippets. Exactly as you would the main "Document content" field. Except it can’t do another TV; if you want it to contain another TV you have to put the inner TV in a chunk.
-
- 433 Posts
Thanks for your help, that works great. I understand the concepts around modx now too, much simpler than most cms out there that I have used.
Thanks
Lee
I think that very simplicity is what confuses so many new users. I like it because the code behind it is mostly pretty clean and simple as well, and I can play with it!
-
- 186 Posts
Yes, that’s one of the main secrets of MODx, no doubt!
Another secret is: how does the parser work?, I mean in which sequence are all the template- chunk- snippet- elements resolved? Since some nesting can happen here, I would very much like to see an outline of the whole procedure.
-
- 4,213 Posts
Quote from: silent at Aug 05, 2006, 04:28 PM
Another secret is: how does the parser work?, I mean in which sequence are all the template- chunk- snippet- elements resolved?
Here’s a post from Wendy explaining the
parsing order. I hope it helps!
"He can have a lollipop any time he wants to. That's what it means to be a programmer."