I am setting up about 10 TVs that will be checkbox, with the output of checked items to display in a list. Each list will have a Title on the webpage. Basically–columns of lists. Some lists will be longer. Others may only have one item in the list. I think I can handle the layout such that the content will look fairly balanced from a design sense.
However, I am struggling to find an optimal approach to handle the selector aspect. What I would like to avoid is having a Title with no list below it. If no items are checked, I don't want reference to that list to appear on the web page.
At the moment my plan is to create a TV for each category (i.e. Interior Features, Exterior Features, etc) , enter the checkbox items, and set the output to be HTML tag "li". Then create a chunk to contain the Title for the category along with the ul and li tags. In between the li tags, I'd put a call for the TV. Then, I'd create a TV selector for the TV—and call the chunk for the TV with the list of items. Seems like a lot
of work just to make a TV optional to display on a page.
A chunk would be called something like interiorFeatures_chunk
A TV with all the available options to select would be called somehting like interiorFeatures_list
A selector would be checkbox with input as: Show Interior Features==[[$interiorFeatures_chunk]]||==
<h4>INTERIOR FEATURES</h4>
<ul>
[[*interiorFeatures_list]] <!--each checked/selected item outputs between li tags here-->
</ul>
Is my approach OK? Is there a better way to approach this?
Another side question: What happens if I need to add and item to a checklist? Does that throw off all the checked items that have already been checked on existing resources?
Any feedback, tips, suggestions, greatly appreciated.