<![CDATA[ getResources row and columns - My Forums]]> https://forums.modx.com/thread/?thread=104792 <![CDATA[getResources row and columns]]> https://forums.modx.com/thread/104792/getresources-row-and-columns#dis-post-563540 CSS => Skeleton
getResources => 1.6.1
getResourcesTpl chunk => <div class="three columns">code...</div>

Hi,
Here is the structure of my page (see the attachment)

<div class="container">
<!-- First Row -->
<div class="row">
<div class="three columns">code...</div>
<div class="three columns">code...</div>
<div class="three columns">code...</div>
<div class="three columns">code...</div>
</div> <!-- end Row -->

<!--Second Row -->
<div class="row">
<div class="three columns">code...</div>
<div class="three columns">code...</div>
<div class="three columns">code...</div>
<div class="three columns">code...</div>
</div> <!-- end Row -->

<!-- N.. Row -->
<div class="row">
<div class="three columns">code...</div>
<div class="three columns">code...</div>
<div class="three columns">code...</div>
<div class="three columns">code...</div>
</div> <!-- end Row -->
</div> <!-- end Container -->

I'm trying with getResources to generate this structure. That is to say a row to all 4 children. I could not do it.

I also tried with the snippet getResourcesColumns from SepiaRiver. I followed his insruction but without success.
Source : https://tinyurl.com/yc7j8nfd

My question, is it possible in a simple way with getResources to generate this structure.

Thank you]]>
jber Jan 11, 2019, 06:25 PM https://forums.modx.com/thread/104792/getresources-row-and-columns#dis-post-563540
<![CDATA[Re: getResources row and columns]]> https://forums.modx.com/thread/104792/getresources-row-and-columns#dis-post-563562
For the modulus, you'd put something like this into your chunk:

[[+idx:mod=`4`:eq=`0`:then=`</div><div class="row">`:else=``]]
<div class="three columns">code...</div>


With &tpl_nN, you'd add this to your getResources call:

&tpl_n4=`getResourceChunk4th`


and in the chunk getResourceChunk4th you'd close and open your row like the previous example.

Wrap your getResources in the "outer" row, and it should be pretty fault-proof.]]>
markh Jan 14, 2019, 07:40 PM https://forums.modx.com/thread/104792/getresources-row-and-columns#dis-post-563562