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

Template path comments

Seeing in the page source which template wrote which markup: switching on ShowTemplatePathComments, reading the START and STOP comments and the override source in brackets, the Exp debug bar toggle, and why it must stay…

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/help/designers/templates/template-path-comments.md

On this page

Template path comments

This page is for designers who look at a page and need the template behind a piece of it. With template path comments on, every rendered template is wrapped in two HTML comments naming its file. The feature page is Template path comments.

Contents

  1. Switch it on
  2. Read it
  3. Cautions

Switch it on

On a test siteaccess:

# settings/siteaccess/<test siteaccess>/site.ini.append.php
[TemplateSettings]
ShowTemplatePathComments=enabled

then clear the template cache (php bin/php/ezcache.php --clear-tag=template), because compiled templates carry the check. The Exp debug bar can toggle the same setting.

Read it

<!-- START design/media/templates/pagelayout/footer.tpl -->
...the footer markup...
<!-- STOP design/media/templates/pagelayout/footer.tpl -->

When an override answered, the requested template is named in brackets:

<!-- START design/media/templates/node/view/full/article.tpl (node/view/full.tpl) -->

"the file article.tpl answered the request node/view/full.tpl". In the browser's element inspector, the comments appear around the elements, so you can climb from any element to its template.

Cautions

  • Development only: the comments add markup to every template, break JSON, XML and RSS output, and reveal file paths. Keep the setting disabled on live siteaccesses (its comment in settings/site.ini says the same).
  • Cached output keeps the comments it was rendered with: clear content and template caches after switching.

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