Can the IF extra cn be use with odd

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 :slight_smile: ).

Do you have a suggetsion?

Here is how I strated:
I add here idx=1, to make sure, the incrementation start with 1

					&tplWrapper=`@INLINE <div>[[+output]]</div>` 

in my evenementsTpl, I added this


My idea, is “if odd use then, if pair use else”


Instead of your IF call - I’d use the modulus output modifier here:


The getResources snippet has a &tplOdd parameter, which might do what you want.

1 Like

Good shout Bob - forgot about that!

Thanks @dejaya and @bobray for your replies.I am going to look for botth.

I saw that but I need to have additonal chunck and I prefer to limit.
I sucessed with output modifier.