Blog Sections Open
Splitting Ditto News Output into Three Columns
A practical way to turn one Ditto stream into a three-column news layout in Evolution CMS.
Ditto outputs one continuous list by default, but many older Evo themes need a magazine-style layout with several columns. The temptation is to hard-code column wrappers directly in the row template, which usually works until the item count changes.
Starting point
[[Ditto? &id=`news` &startID=`21` &summarize=`9` &tpl=`project_tpl`]]
The row template then checks the iteration value:
[[if?is=`[+ditto_iteration+]:=:3` &then=`</div><div id="right-block-column1">`]]
<a href="[~[+id+]~]" class="main-block">
<div id="block1">[+image-project+]</div>
<h3>[+pagetitle+]</h3>
</a>
What this does well
Using [+ditto_iteration+] is a workable way to switch wrappers at known positions. It is simple and can be enough for a fixed-size homepage block.
What to watch for
- If the number of items changes, your wrapper logic may break.
- Putting opening and closing layout containers inside one row template is hard to maintain.
- Uneven item counts can leave the last column structurally awkward.
Safer options
For fixed homepage blocks, keep the total item count fixed and explicitly open the first wrapper before Ditto. For more flexible layouts, consider grouping items in a wrapper snippet or using a layout that allows CSS columns or grid without injecting structural markup in the row loop.
The key idea is to let Ditto handle content iteration while your layout layer stays predictable. When the layout logic becomes more complex than the listing itself, it is usually time to move that grouping logic into a clearer helper pattern.
Choosing the Right Catalog Structure in Evolution CMS
How to think through catalog architecture in Evolution CMS when products arrive from spreadsheets and the site must stay maintainable for editors and frontend developers.
Filtering getResources and pdoResources by Tag-Like TV Values
How to filter Evolution CMS resource listings by a TV that stores comma-separated tag-style values, and what to watch for when using LIKE-based matching.