
Or alternatively, if I'm going about this all wrong, don't hesitate to say!
.post:nth-of-type(3n+1) { clear: left }
[[+number:mod=`3`:is=`0`:then=`<div class="clear"> </div>`:else=``]]
<div class="articles-item [[+number:incr:mod=`3`:is=`0`:then=` clear`:else=``]]">
Insert article markup here
</div>
<div class="articles-item [[+clearclass]]">
Insert article markup here
</div>
[[$rowTpl? &clearclass=`clear` &id=`[[+id]]`]]
&id=`[[+id]]`
I would prefer the tpl_nN - method, for performance - reasons.Ok, so I've added "&tpl_n3=`portfolio-thirdRowTpl`" (reflecting how my thirdRowTpl is named) to the "Other listing Parameters" in the Portfolio article container's Advanced Settings tab, as well as sticking the code chunks where you've suggested... It looks like the formatting is working, but the third entry on the top row is now invisible (it's there in the source, wrapped in <div class="articles-item clear">)? Was there something I didn't do?
Could be a bit faster, than using math and conditional output-filters.
If you don't like duplicate code, try this:
&tpl = `rowTpl`
&tpl_n3 = `thirdRowTpl`
in your chunk rowTpl:
<div class="articles-item [[+clearclass]]"> Insert article markup here </div>
in your chunk thirdRowTpl:
[[$rowTpl? &clearclass=`clear` &id=`[[+id]]`]]
may beis needed for a unique footprint for each chunk-call, not sure.&id=`[[+id]]`

[ed. note: kupocake last edited this post 12 years, 8 months ago.]
Will I need to create "sixthRowTpl" if I want 9 of these per page?
Awesome, thanks againWill I need to create "sixthRowTpl" if I want 9 of these per page?
&tpl_nN does work on every Nth row
so
&tpl_n3
does work on row 3,6,9,12......