Thanks so far for all the help.
So from a few posts and reading the forums i've now got 1 template, with a TV asking if you want 1 2 3 main columns / rights columns etc and then inserting that output to a stylesheet to then show or hide divs based on the users input. Not sure if this is the best way to do this but i'm still learning.
My next question is, lets take right col 1 for example. I want to have 3 choices for the user
1) Pick a pre built piece of content to include (something thats repeated like contact details
or
2) Title
3) Content
So is it possible in the TV to have a list of pre built content that a user can select to include and if nothing chosen ignore and use content from 2 / 3 to build that module
Thanks for any more help.
Ben
Hi,
understand well that you want the user to be able to eg tick a box to make that pre built content appear in col_1. Or another box to just show a title (h1?) and another one to show just content? Would the latter be pre built? Or a document in the tree the user can create?
Anyway, you could eg use ditto. So make a container, in there you put you prbuilt content in the form of documemnts.
Make a tv eg "box01" with a choice for these document id inside that container. In the tpl you could use place holders [+pagetitle+] etc. Create one tpl per choices you want and a tv (iBox01 as example) that would point to those three different tpl chunks
ANd create a call with that TV in it:
[!Ditto? &documents=`[*box01*]` &tpl=`[*iBox01*]` &display=`1`&noResults=` `!]
now box01 would fill out the number of the doc you want to show and Ibox01 would give the choice on how to show it. Hope it sounds okay, best, Frank.
Smart Shawnh, realy nice solution
-
☆ A M B ☆
- 3,141 Posts
Try
[[!chunkListParser:empty=`[[*rightNavBoxCheck1]]`:notempty=`[[$rightNav1]]`]]
Thanks Mark
Getting closer, but still not what i'm expecting.
Now when i click on either of the radio buttons for my tv it still showing the contents of rightNav1
Yet if now radio buttons selected i don't get anything showing.
Not sure if i'm just way of the mark. What i'm trying to do is check if a button has been selected in my tv, if yes pull in the content of the chunks, if it's empty and nothing selected then show $rightNav1
-
☆ A M B ☆
- 3,141 Posts
So if the checkbox is empty you want to display your chunk, and else the chunkListParser snippet?
[[*rightNavBoxCheck1:empty=`[[$rightnav1]]`:notempty=`[[!chunkListParser]]`]]