XF 2.1 Is there any way to debug which template is used on any page?

sajal

Active member
Often times, we need to alter the HTML structure of specific pages. And the first thing is to find from where the content is actually coming from.

There are so many templates, and it is difficult to spot a specific template for a page. So, is there any debugging feature/addon, that for example, provides template-name/path in the view source (during debug mode), so that we could easily see from where the content is coming from?

Since, at the moment, we've to "trial and error" in templates to check which template is for which page.

Thanks.
 
Using your browser, view the page source and look for a line of code near the top of the page which begins
<div id="content" class="; the class is the name of the template. So for the main forum page, the line of code is: <div id="content" class="forum_list">, which makes the template forum_list.
 
Or for some browsers Put this in the URL field

Code:
javascript:(function()%7BXF.flashMessage($('html').data('template'),%2012000)%7D())

(I have that as a bookmark in my browsers)
 
Last edited:
There are so many templates, and it is difficult to spot a specific template for a page. So, is there any debugging feature/addon, that for example, provides template-name/path in the view source (during debug mode), so that we could easily see from where the content is coming from?
If you hover over the cog in the footer (in debug mode), it should tell you the main template of the page (along with the controller and action). No need to view the source or use JS.
 
Top Bottom