2019-11-18 05:58:33 +01:00
|
|
|
---
|
2016-10-13 18:39:10 +02:00
|
|
|
title: Template debugging
|
|
|
|
summary: Track down which template rendered a piece of html
|
2019-11-18 05:58:33 +01:00
|
|
|
icon: bug
|
|
|
|
---
|
2016-10-13 18:39:10 +02:00
|
|
|
|
|
|
|
# Debugging templates
|
|
|
|
|
|
|
|
## Source code comments
|
|
|
|
|
|
|
|
If there is a problem with the rendered html your page is outputting you may need
|
|
|
|
to track down a template or two. The template engine can help you along by displaying
|
|
|
|
source code comments indicating which template is responsible for rendering each
|
|
|
|
block of html on your page.
|
|
|
|
|
2017-10-27 04:38:27 +02:00
|
|
|
```yml
|
|
|
|
---
|
|
|
|
Only:
|
|
|
|
environment: 'dev'
|
|
|
|
---
|
|
|
|
SilverStripe\View\SSViewer:
|
|
|
|
source_file_comments: true
|
|
|
|
```
|