Blog Sections Open

Breaking a Ditto News Feed to Insert a Banner or Promo Block

A practical pattern for interrupting a Ditto-powered news list with extra frontend content after a certain number of items.

Sometimes a homepage news block should not stay one uninterrupted list. A banner, promo card, or secondary content block may need to appear in the middle of the stream.

Basic Ditto call

[!Ditto? &parents=`12` &tpl=`news-main` &display=`6` &orderBy=`pub_date DESC` &dateSource=`pub_date` &dateFormat=`%d.%m.%Y`!]

If the output should be interrupted after a chosen item, the same logic used for column breaks can be applied here: check the iteration counter and insert the extra block at the breakpoint.

Practical pattern

Keep the row template simple, and inject the banner through an iteration check or wrapper chunk. That way Ditto still controls the content ordering while the layout layer decides where the interruption happens.

Why this is useful

This pattern works well for homepages and editorial landing pages where one promo should sit naturally inside a feed without becoming a separate manually maintained area.

Newer post

Using the IF Snippet Safely When Zero Is a Valid Value

How to write Evolution CMS IF conditions correctly when the compared value can legitimately be zero and should not be treated as empty or false.

Older post

Fixing Shopkeeper JavaScript Errors Around .shk-item Containers

How to troubleshoot Shopkeeper setups where a JavaScript position error breaks add-to-cart behavior after custom markup changes.