<![CDATA[ getImageList Conditional Every 3rd Entry? - My Forums]]> https://forums.modx.com/thread/?thread=104616 <![CDATA[getImageList Conditional Every 3rd Entry?]]> https://forums.modx.com/thread/104616/getimagelist-conditional-every-3rd-entry#dis-post-562692
[[+_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 -->
]]>
ceramicmonster Nov 14, 2018, 03:52 AM https://forums.modx.com/thread/104616/getimagelist-conditional-every-3rd-entry#dis-post-562692
<![CDATA[Re: getImageList Conditional Every 3rd Entry?]]> https://forums.modx.com/thread/104616/getimagelist-conditional-every-3rd-entry#dis-post-562767 Quote from: ceramicmonster at Nov 14, 2018, 07:07 PM
Quote from: himurovi4 at Nov 14, 2018, 10:29 AM
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
[[+idx:mod=`4`:is=`0`:then=`<div class="row">`]] <!--you should open new block-->
<div class="col text-center">...</div>
</div></div>

I'm a bit confused, sorry. Can you show me the complete code? Thank you!
Nevermind, I got it. THANKS!]]>
ceramicmonster Nov 15, 2018, 10:36 PM https://forums.modx.com/thread/104616/getimagelist-conditional-every-3rd-entry#dis-post-562767
<![CDATA[Re: getImageList Conditional Every 3rd Entry?]]> https://forums.modx.com/thread/104616/getimagelist-conditional-every-3rd-entry#dis-post-562730 Quote from: himurovi4 at Nov 14, 2018, 10:29 AM
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
[[+idx:mod=`4`:is=`0`:then=`<div class="row">`]] <!--you should open new block-->
<div class="col text-center">...</div>
</div></div>

I'm a bit confused, sorry. Can you show me the complete code? Thank you!]]>
ceramicmonster Nov 14, 2018, 07:07 PM https://forums.modx.com/thread/104616/getimagelist-conditional-every-3rd-entry#dis-post-562730
<![CDATA[Re: getImageList Conditional Every 3rd Entry? (Best Answer)]]> https://forums.modx.com/thread/104616/getimagelist-conditional-every-3rd-entry#dis-post-562701
[[+_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
[[+idx:mod=`4`:is=`0`:then=`<div class="row">`]] <!--you should open new block-->
<div class="col text-center">...</div>
]]>
himurovi4 Nov 14, 2018, 10:29 AM https://forums.modx.com/thread/104616/getimagelist-conditional-every-3rd-entry#dis-post-562701