Blog Sections Open

Applying Template Inheritance Rules with a Custom Manager Plugin

A manager-side plugin pattern for assigning the right template automatically when editors create resources and folders in Evolution CMS.

Editors often create the right resource in the wrong template. In a content-heavy Evolution CMS project that quickly turns into extra support work, broken layouts, and avoidable confusion in the manager.

This older plugin pattern solved that problem by enforcing a custom relationship between folder templates and document templates. Instead of relying only on the built-in global inheritance modes, the plugin let the project define explicit pairs.

Why this was needed

The default manager settings already support basic inheritance such as “system”, “parent”, or “sibling”. That is enough for small structures, but not for catalog-like trees where a container may need one template and its children another.

Plugin idea

The original implementation listened to OnDocFormPrerender and used a configuration string like this:

&customTemplates=customTemplates;text;100,101|102,103

Each pair described a rule in the form:

folderTemplateId,documentTemplateId|folderTemplateId,documentTemplateId

What it gives you

  • fewer template mistakes from editors
  • faster content entry in large trees
  • clearer rules for folders versus regular resources
  • less manual cleanup after content import or expansion

Why the pattern still matters

Even if you would implement this differently today, the principle remains solid: if the content model is predictable, the manager should help enforce it. Good admin UX removes choices that should never have been manual in the first place.

Newer post

Showing menutitle Instead of pagetitle in the Manager Tree

A small manager tweak for projects where long page titles make the resource tree hard to scan and a shorter menu title is easier to work with.

Older post

Bulk Editing Resources in Evolution CMS with Fast Content CSV

A practical guide to using Fast Content CSV for bulk resource updates, imports, exports, and field maintenance in older Evolution CMS projects.