Blog Sections Open
Keeping Ditto Summary Output Clean When introtext Contains HTML
Summary extenders are convenient until the source text already contains HTML. Then a simple summary call can produce broken tags, awkward truncation, or unreadable snippets in listing pages. Typical Situation [[Ditto? &p
Summary extenders are convenient until the source text already contains HTML. Then a simple summary call can produce broken tags, awkward truncation, or unreadable snippets in listing pages.
Typical Situation
[[Ditto?
&parents=`6`
&tpl=`ditto-news-tpl`
&sortDir=`ASC`
&paginate=`1`
&display=`10`
&extenders=`summary`
]]
Main Problem
If the source field contains markup, the summary layer may cut through tags or count HTML as part of the visible text length. The result is messy output, especially in cards and archive pages.
Better Approach
- strip tags before truncation
- generate summaries from plain-text intro data where possible
- treat summary generation as formatting logic, not as raw field slicing
In older Ditto projects, many output issues were solved simply by normalizing the source text before the extender touched it.
Do longtitle and description Need to Be Filled for Every Resource?
A practical SEO-oriented answer to when longtitle and description fields are worth filling and when they should not become empty routine.
Adding 301 Redirects Safely in an Evolution CMS .htaccess File
How to add manual 301 redirects to an Evolution CMS site without breaking the main rewrite flow.