Hello,
I am currently writing a chunk that gets passed in a Boolean parameter (0 or 1). If the parameter is not specified, I want to assume false.
This chunk calls another chunk. Depending on the value of the parameter, I want to put the chunk that is getting called in different locations.
Strangely, the chunk called with :notempty works perfectly, but the chunk with :empty doesn’t. I’m not quite sure why, but I think it has something to do with HTML output. When I put any HTML into the value for the empty filter, it stops working.
<div class="field [[+classes]]">
[[+reverse:empty=`[[$formLabel]]`]]
<input type="[[+type]]" class="[[+type]]" name="[[+id]]" id="[[+id]]" value="[[+fi.[[+id]]]]" />
[[+reverse:notempty=`[[$formLabel]]`]]
</div>
I would prefer not to have to use a snippet for something that seems so within reach, but that might be the only way.
Is there anything I can do to fix this? Thanks.