[[+_first:is=`0`:then=`<div class="row">`:else=``]] <!-- Also need inserted every 4th --> <div class="col text-center"> <img src="[[++assets_url]]img/flame.png" class="" /> <h2>[[+client_name]]</h2> <hr> <h3>[[+client_story]]</h3> </div> [[+_last:is=`1`:then=`<div>`:else=``]] <!-- Also need inserted every 3rd -->
This question has been answered by himurovi4. See the first response.
[[+_first:is=`0`:then=`<div class="row">`:else=``]] [[+_last:is=`1`:then=`<div>`:else=``]]
[[+idx:mod=`3`:is=`0`:then=`</div>`]] <!--you should close previous block-->
[[+idx:mod=`4`:is=`0`:then=`<div class="row">`]] <!--you should open new block--> <div class="col text-center">...</div>
That's good,
[[+_first:is=`0`:then=`<div class="row">`:else=``]] [[+_last:is=`1`:then=`<div>`:else=``]]
PLUS between first and last conditions:
[[+idx:mod=`3`:is=`0`:then=`</div>`]] <!--you should close previous block-->
and after
</div></div>[[+idx:mod=`4`:is=`0`:then=`<div class="row">`]] <!--you should open new block--> <div class="col text-center">...</div>
Quote from: himurovi4 at Nov 14, 2018, 10:29 AMNevermind, I got it. THANKS!That's good,
[[+_first:is=`0`:then=`<div class="row">`:else=``]] [[+_last:is=`1`:then=`<div>`:else=``]]
PLUS between first and last conditions:
[[+idx:mod=`3`:is=`0`:then=`</div>`]] <!--you should close previous block-->
and after
</div></div>[[+idx:mod=`4`:is=`0`:then=`<div class="row">`]] <!--you should open new block--> <div class="col text-center">...</div>
I'm a bit confused, sorry. Can you show me the complete code? Thank you!