Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,059 of 9,059 pages
About the help in other languages
All help pages

Layout rules

How a page gets its layout: rules with targets (path, node, subtree), conditions (siteaccess, content type, query parameter, time) and priority; the first match wins; the resolver cache; and the fetch that shows which…

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/help/designers/theme-design/layout-rules.md

On this page

Layout rules

This page is for designers who wonder why a page shows a certain layout. Rules (called mappings in the editor) decide it. Full reference: Exponential Layouts, "Rules".

Contents

  1. A rule
  2. Targets
  3. Conditions
  4. First match wins
  5. Debugging the layout of a page

A rule

A rule has a layout, targets, conditions, a priority and an enabled switch. The resolver (expLayoutsResolver::resolve()) walks the enabled rules by priority and returns the first published layout whose rule matches the request.

Targets

TypeMatches when
path_prefixthe request path starts with the value
paththe path equals the value
path_regexthe path matches a regular expression
nodethe request is this content node
subtreethe request's node is below this location

subtree survives an editor renaming a folder; a path_prefix does not.

Conditions

TypeRestricts by
siteaccessthe siteaccess serving the page
content_type / classthe content class of the node
query_parameter, route_parametera parameter in the URL
timea date range (campaign layouts that switch themselves on and off)

An unknown condition type matches rather than fails, so a typo widens a rule instead of disabling it.

First match wins

When a layout does not appear, a broader rule with a higher priority usually catches the page first. Look at the priorities before anything else.

Debugging the layout of a page

  • In a template: fetch( 'explayouts', 'rules_for_node', hash( 'node_id', $node.node_id ) ) lists the rules that match a node, and fetch( 'explayouts', 'resolve_layout_for_node', hash( 'node_id', ... ) ) returns the layout it would get (extension/explayouts/modules/explayouts/function_definition.php).
  • The resolver caches its result per path under var/<site>/cache/explayouts/resolver/ with explayouts.ini [ResolverSettings] CacheTTL (3600 seconds). Publishing in the editor clears it; a rule changed directly in the database does not.
  • [ResolverSettings] DefaultLayout names the layout used when no rule matches, if any.

Become an Exponential Partner

Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x