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

Override by parent

Templates that depend on where content sits: matching the parent's class (parent_class_identifier), the parent's remote id, the parent node, a URL subtree (url_alias prefix) or the depth, with examples for blog posts…

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/help/designers/templates/override-by-parent.md

On this page

Override by parent

This page is for designers who want content to look different depending on where it is placed: an article under a blog, items in the news folder, top-level pages.

Contents

  1. By the parent's class
  2. By a specific parent
  3. By a subtree
  4. By depth

By the parent's class

[mytheme_line_post_in_blog]
Source=node/view/line.tpl
MatchFile=line/blog_post_in_blog.tpl
Subdir=templates
Match[class_identifier]=blog_post
Match[parent_class_identifier]=blog
Priority=10

Portable: works wherever blogs are placed.

By a specific parent

Match[parent_node_remote_id]=mytheme-news-folder (portable) or Match[parent_node]=61 (this installation only). Matches only the direct children.

By a subtree

Match[url_alias]=news matches every page whose URL alias starts with news: the whole News area at any depth. Note that it follows the URL, so renaming the folder breaks the rule; a section is the more robust tool for a large area (Override by section).

By depth

Match[depth]=2 matches pages directly under the root (the root node of the tree has depth 1); handy for a different template for top-level pages.

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