How to display directory using pdoTools in MODx?

Hi all.
Through pdoTools deduce the product catalog
<div class="row">

[[!pdoPage?
&parents=`13`
&pageLimit=`8`
&depth=`0`
&tpl=`articleTpl`
&includeTVs=`newsImage`
&sortdir=`ASC`
]]
 </div>


The template output is a trace.view
<div class="col-md-4">
<article class="animate-box">
 <a href="[[~[[+id]]]]" class="blog-img text-center" style="background-image: url([[+tv.newsImage]]);">
 <span class="icon"><i class="icon-search2"></i></span>
</a>
<div class="entry">
 <h2><a href="[[~[[+id]]]]">[[+pagetitle]]</a></h2>
 <p class="meta-2"><span><i class="icon-calendar2"></i> [[+createdon:date=`%Y-%m-%d`]]</span></p>
<p>[[+introtext]]</p>
</div>
</article>
</div>


As in the markup specified col-md-4 received 3 products in the line.
I also need to bring the catalog in accordance with this markup
<div class="row">
 <div class="col-md-4">
 ... 
</div>
 <div class="col-md-8">
...
</div>
 <div class="col-md-6">
...
</div>
 <div class="col-md-6">
...
 </div>

Here's the layout supposed to be
5def461112327701471915.png
April 3rd 20 at 17:15
1 answer
April 3rd 20 at 17:17
Solution
You can try to bind to [[+idx]] of each element. If the type 1 - out col-md-4, if 2 - print col-md-8 and so on.
By means of JS? - Dalton_Kassulke commented on April 3rd 20 at 17:20
@Dalton_Kassulke, no means of modifiers MODx.
[[+idx:is='1':then='...']] - Marisa_Mill commented on April 3rd 20 at 17:23
Everything turned out, thank you!
<div class="[[+idx:is=`1`:then=`col-md-4`]][[+idx:is=`2`:then=`col-md-8`]][[+idx:is=`3`:then=`col-md-6`]][[+idx:is=`4`:then=`col-md-6`]] animate-box">
 <div class="project-entry">
 <a href="[[~[[+id]]]]" class="project-img text-center" style="background-image: url([[+tv.productImage]]);">
 <span class="icon"><i class="icon-search2"></i></span>
</a>
 <div class="desc">
 <h3 class="lh20"><a href="[[~[[+id]]]]">[[pdoField? &id=`[[+id]]` &field=`pagetitle`]]</a></h3>
</div>
</div>
</div>
- Dalton_Kassulke commented on April 3rd 20 at 17:26

Find more questions by tags CSSMODXHTMLBootstrap