I’m trying to organize a site so that the editing can be done easily by someone with practically ZERO knowledge of modx.
I have three teaser boxes on the front page -- heavily styled so that just plopping a rtf edit box won’t work, and I can’t expect the person to add the proper style or IDs to the content when creating a new tease from scratch.
I realize I could create TVs within the home page template for each teaser box...BUT I’d like to more flexibility to swap out content formats than hard-coding the TVs in the main template.
I want to bind each box via a TV to separate documents (called: teaser1, teaser2, teaser3). So @document should work? No, it only pulls in the "content" and does not parse ’teaser1’ through its own template (which assigns the proper styles to its own TVs.
I create a ’teaser’ template with four TVs (teaser-hed,teaser-url,teaser-img,teaser-html). I created a document ’teaser1’ assign it the teaser template and fill in the teaser TVs. Say ’teaser1’ has ID=10, if I add in the home page template a TV with @DOCUMENT 10 binding, it will only output the contents, and not parse the other TVs.
Essentially, I can do it inelegantly by using a php include include ’index.php?id=10’ to force the TVs through the template for teaser1, teaser2, teaser3 but it’d be more beautiful to do it through a binding. And I assume there’d be less overhead.
Another reason for wanting to do it this way, is in the future I can replace teaser1 with a blog, teaser2 with a gallery all by changing the document and not messing the the home page template.
@INCLUDE 10 would be a nice way to parse a document through its template and then bind it to a TV in the parent document.
The reason I don’t want to do this through chunks or snippets is for ease of editing for the non-techie. Also remember I can put these teasers pages within the homepage container so they are right there for easy editing and organization in the manager.
Set me straight if there is a good way to do this.
-
☆ A M B ☆
- 397 Posts
Did you ever get a response to this?
Benjamin Davis: American web designer living in Munich, Germany and a MODX Ambassador. I am also co-founder of SEDA.digital, a MODX Agency.