Skip to content
  1. Extras
  2. SeoData
  3. Templates

Templates ​

A rule stores conditions, a data priority, and four Fenom templates. Saving, deleting, or enabling a rule clears the MODX cache, including the compiled Fenom cache of pdoTools.

Common templates ​

A common rule is chosen by page type, parent, and MODX template.

Common template list

Page type:

ValueClass
DocumentmodDocument
MS3 productmsProduct
MS3 categorymsCategory

The “Parent resource” column shows the parent id. An empty parent in the form means any section. The “Templates” column marks which texts are filled in: h1, title, description, content.

Double-click a row, or use the pencil, to open the rule.

Editing a common template

Condition fields:

FieldMeaning
Page typeDocument, product, or category
Parent resourceThe section where the rule applies. Empty means any parent
MODX templateThe resource template. Empty means any template. Together with the parent, the condition is AND
Including childrenThe rule also applies to nested resources
PriorityA higher number is compared before other common rules
Data priorityWhere headings and the description come from
ActiveA disabled rule is not considered

“SEO fields” block:

FieldPurpose
Page heading templateH1 / pagetitle
Meta title template<title> / longtitle
Meta description templatedescription
Page number templateThe {$page} fragment when ?page=N

Content ​

On the “Content” tab the priority is set separately from the headings.

Content template

Personal templates ​

A personal rule is bound to one resource. Only one rule per resource can be active.

Personal templates

The data priority and field templates are the same as for a common rule. Parent and MODX template conditions are not set here: the resource is chosen explicitly.

Data priority ​

ValueBehavior
resourceKeep the native field. The template is used only when the field is empty
componentAlways use the template result
component extends resourceJoin the resource value and the template result

Content uses a separate priority on the “Content” tab.

The seodata.fallback_empty_resource system setting refines the “resource” mode: when the resource field is empty, the template is used. seodata.keep_filled_on_empty in “component” mode does not overwrite a filled resource field when the template returns an empty string.

The page number is appended to title, pagetitle, and description when the URL has ?page=N. The seodata.always_append_page setting turns this on whenever the parameter is present.