Hi,
I am writing a chunk whoch will display pictures with text within a div.
It will have 2 colomn and “many” rows.
Before the first picture, I need to add <div class="row">
and after the second picture, I need to add </div>
, in order to build the row with two cell.
My idea, was to use the extra if with idx. I looked at the doc but it look like I can not check if the number is an odd or not (I hope I did not miss something ).
Do you have a suggetsion?
Here is how I strated:
I add here idx=1, to make sure, the incrementation start with 1
[[getResources?
&parents=`[[*id]]`
&idx=`1`
&includeContent=`1`
&includeTVs=`1`
&tplWrapper=`@INLINE <div>[[+output]]</div>`
&tpl=`evenementsTpl`
&sortby=`{"menuindex":"ASC"}`
&limit=`0`
&showUnpublished=`0`
&showHidden=`1`
]]
in my evenementsTpl, I added this
[[If?
&subject=`[[+idx]]`
&operator=`=`
&operand=`5`
&then=``
&else=``
]]
My idea, is “if odd use then, if pair use else”
Thanks