Blog Sections Open

Removing a Section Alias from Evolution CMS URLs

A legacy routing guide for cases where you want cleaner nested URLs without destroying the document tree structure in the manager.

Legacy Evolution CMS projects often hit the same SEO and UX problem: the real document tree is correct for editors, but one or more container aliases make the public URL deeper than it needs to be.

The usual bad choices

  • disable nested friendly URLs completely and lose the hierarchy
  • flatten the tree in the manager and make editorial work messy

The original article explored a third option: keep the manager structure, but change how the cached routing path is built.

The core idea

Add a per-resource flag that tells the URL builder whether a given document should participate in the final path. In practice that means a container can stay in the tree while disappearing from the public URL.

What the old implementation changed

  • a new alias_visible field in site_content
  • a checkbox in the manager edit form
  • custom logic in the cache-building processor so hidden aliases are skipped
$path = ($this->aliasVisible[$id] == 1)
? $this->aliases[$id] . ($path != '' ? '/' : '') . $path
: $path;

Why this was useful

It gave projects cleaner public URLs without forcing editors to abandon the natural content tree.

Modern caution

This is a legacy core-modification technique, not a recommendation for every current project. If you use it, document the patch carefully and test every routing-dependent extra. But as a historical Evolution CMS pattern, it remains a very practical example of how flexible the cache-based routing layer can be.

Newer post

Creating a Simple Name Library for Reusable Text in Evolution CMS

A lightweight pattern for storing small reusable text fragments in a chunk and returning them through a snippet instead of hard-coding them everywhere.

Older post

A Starter Boilerplate for Building MODX Evolution Modules

A reusable module skeleton for Evolution CMS projects with separated model, controller, and view layers plus editable configuration.