Blog Sections Open

truncate Revisited: Cleaner Summaries for HTML Content

An extras-style note about a stronger truncate helper derived from the DocLister summary logic, with better handling of HTML content and parser-like text.

The original truncate helper in the donor setup worked, but it struggled with HTML-heavy text. The improved version took ideas from DocLister’s summary logic and turned them into a reusable standalone helper.

Why the update mattered

  • better handling of HTML tags
  • safer shortening of nested markup
  • optional stripping of tags
  • a noparser mode for text that resembles MODX tags

Typical usage

[[truncate? &text=`[+content+]` &len=`100`]]
Newer post

Rewriting Ditto Pagination Links Without Breaking the Query String

How to change Ditto pagination URLs in Evolution CMS while keeping the pagination parameter working correctly.

Older post

Avoiding Duplicate Product URLs Across Multiple Categories

A catalog architecture note on handling products that appear in several categories without creating unnecessary duplicate URLs.