Wednesday 23 February 2011 9:52:44 pm
I'm going slightly mad... I attempted to insert a checkbox data type into a document class and then to display something if the box is checked during document creation. The problem is, I can not find a test condition to use in the template. "has_content" or "is_empty" do not work, because all checkboxes have content. Then I stumbled on "attribute(show)" and could at least see where a checked and a not checked box differ, but going through all kinds of operators I could still not get to different (checked/not checked) results. What I try looks very simple: {if $node.data.map.check|eq('1')} <div>display something</div> {/if} But it does not work. (The checkbox is named "check".) Also changing it to $node.data.map.check.value|eq('1')} (because the value for a checked box is 1) makes no difference. Unfortunately, most people only want to fetch such information for queries, so a forum search did not really bring me forward. I am pretty sure this is something mindboggingly simple, but since I just can not find the answer I would be grateful for a helping hand...
|