Blog Sections Open
Paginating Ditto Output That Uses MultiTV Galleries
A practical guide to fixing the classic case where Ditto paginates resources correctly but embedded MultiTV output breaks across page offsets.
Combining Ditto with MultiTV is convenient until pagination enters the picture. In the donor case, a news listing rendered a MultiTV gallery inside each Ditto row. The first page worked, but later offsets such as ?start=1 or ?start=2 no longer behaved the way the editor expected.
The underlying issue is usually not pagination alone. It is the interaction between Ditto row placeholders and the way MultiTV reads the current document context.
Typical setup
[[Ditto?
&startID=`11`
&tpl=`photosTpl`
]]
[[multiTV?
&tvName=`photogallery`
&docid=`[+id+]`
&display=`all`
]]
Why later pages break
- Ditto paginates resource rows correctly.
- MultiTV still needs an explicit and stable
docidfor each rendered row. - If the row context is not passed cleanly, gallery output can appear incomplete, duplicated, or empty on later pages.
Safer pattern
Keep the gallery rendering tied to the actual Ditto row ID and avoid assumptions about the current page context. When needed, move the gallery logic into a dedicated row chunk or helper snippet so the row ID is always resolved before MultiTV runs.
The main lesson is simple: pagination and TV-driven subcontent should share the same document context contract, or the listing becomes fragile as soon as offsets change.
Installing Twig in Evolution CMS with Composer and EvoTwig
How to add Twig templating to Evolution CMS using Composer, EvoTwig, and a predictable file-based template workflow.
Switching to Mobile Templates with OnWebPageInit and OnLoadDocumentObject
A practical two-plugin pattern for serving mobile templates in Evolution CMS while keeping cache behavior predictable.