First, thanks for your ideas.
I’ve got a site where I dont want the editors/administrators to see chunks and snippets. I want all of their content to be in the document tree- including sidebar blocks. So I’ve setup a container called ’Side blocks’ where all of the different pages will go (contact, sign in, etc.)
My first thought was to create TV checkboxes for ’right-column’ and ’left-column’. And let their values be chunks. I’ll put the appropriate snippets in the chunks so I can change/massage the data however is needed.
Is this a good way? How do/would you do it?
The sideblock container is going to have multiple documents. One document for each item that could be side-block. Examples:
- login
- rss feed
- latest news
- mini-calendar, etc.
Well, first you could add two "empty" templates named "LeftColumn" and "RightColumn". The Content-Administrators then add Documents to the Tree and assign the desired Template to it.
Eg:
[tt]
DocumentA (tpl: BaseTemplate)
+-- DocumentB (tpl: LeftColumn)
+-- DocumentC (tpl: LeftColumn)
+-- DocumentD (tpl: RightColumn)
+-- DocumentE (tpl: BaseTemplate)
+-- DocumentE1 (tpl: RightColumn)
+-- DocumentF (tpl: RightColumn)
+-- ...
[/tt]
Document B and C have the LeftColumn Template assigned, Document D, F and E1 the "RightColumn" template. You then use a Snippet (for example Ditto, or one you program yourself) in the BaseTemplate that inserts all Contents from Child-Documents with Temlate "LeftColumn" into the left column and from Documents with Template "RightColumn" to the right column. That would even work for nested Structures (DocumentE and DocumentE1) and you can easily move parts of the Document Tree without breaking your Content-Setup. Additionally you might want to hide the RightColumn and LeftColumn Documents from the Menu, if you’re using dynamically generated menus with wayfinder or a similar snippet.
Edit: That way a generated Menu would look like this (showing only Documents that don’t have the RightColumn or LeftColumn template assigned)
[tt]
DocumentA (tpl: BaseTemplate)
+-- DocumentE (tpl: BaseTemplate)
[/tt]