Hi there! I need to output TV-value (listbox multi-select) if it is not empty.
I try [[*char:notempty=`...`]] it work for other type of TV but not to listbox multiselect.
Please help.
Also tried to use :toPlaceholder modifier - its not works/
do you get anything with:
It is markup for goods characteristics
<dl class="chars-dl">
[[*color:notempty=`
<dt>oclor:</dt>
<dd>[[*color]]</dd>
`]]
[[*material:notempty=`
<dt>material</dt>
<dd>[[*material]]</dd>
`]]
...
</dl>
its work for other types. For lisbox bulti-select if no value still outputs markup without value.
I get it - its becouse of output options output type html-tag option.
if you have MIGX, you can do it this way:
[[getImageList?
&value = `[
{"MIGX_id":"1","label":"color","value":"[[*color]]"},
{"MIGX_id":"2","label":"material","value":"[[*material]]"}
]`
&tpl=`tpl_attribute`
&wrapperTpl=`@CODE:<dl class="chars-dl">[[+output]]</dl>`
]]
chunk tpl_attribute:
[[+value:isnot=``:then=`<dt>[[+label]]:</dt><dd>[[+value]]</dd>`:else=``]]