Learning: Debugging Site Template Settings

About

By enabling the Debug setting in site.ini, [TemplateSettings] eZ publish will put XHTML comments in your template output.

Settings

[TemplateSettings]
# Debug=disabled
Debug=enabled

Example

These comments will show you where the parsed output of certain templates starts and stops. An example:

<!-- START: including template: design/corporate_site/override/templates/collectedinfomail/feedback_form.tpl (design:content/collectedinfomail/form.tpl) -->

...

<!-- STOP: including template: design/corporate_site/override/templates/collectedinfomail/feedback_form.tpl (design:content/collectedinfomail/form.tpl) -->  

You can also display these markers as paragraphs on the web page, by using the ShowXHTMLCode setting.

You should disable template debug on production sites. When you're using the notification system or information collector mails, these markers will be put in your mail too, also when the mails are in plain text.

Quick settings toolbar

You can switch Debug on and off with the "Template debug" checkbox of the quick settings toolbar in the admin interface.

External resources