[Already Exists] Template Name Comments in when viewing source HTML

silendreamer

Active member
I am not sure if this has been requested already. I tried searching but did not see any related threads.

This suggestion is simple. Basically when we view the source code of a page in vB (with "Add Template Name in HTML Comments" it shows all the template names and it becomes easy for an admin to modify a particular template to achieve a certain effect.

However with Xenforo, it is pretty difficult to modify the templates, without actually knowing which template to edit.

Can this feature be added? Or is it already available and I did not look properly in the admin CP ?
eek.png
 
Upvote 0
You can find out the template by looking for the div with an ID of content and looking at the class name.

For example, for this page:
Code:
<div id="content" class="thread_view">

Therefore, the template is thread_view.
 
You can find out the template by looking for the div with an ID of content and looking at the class name.

For example, for this page:
Code:
<div id="content" class="thread_view">

Therefore, the template is thread_view.

Really? Is that true for each and every template? I haven't even tried to modify any templates in Xen yet, so sorry if I am asking for the obvious
confused.png
 
Yeah, that's true.

Check the index - <div id="content" class="forum_view">

The class of the div with an ID of content is the template you edit.
 
For eg: the forumhome page in Xenforo, I have no idea which template to edit, cuz it does not show the template name anywhere. The page begins with <html ... blah blah !!

Where as in vB at the top it clearly shows "Template FORUMHOME"
 
acd58130fe53403d9e86232.png


0acdee98875d4a6e9b287fb.png


Etc, etc.

It's confusing to begin with, but once you've got the hang of it it's a lot easier to just Ctrl + F -> id="content" than flick on/off the ACP option.
 
This seems to have changed and the templates can no longer be identified this way, at least not in the latest version (1.3.3). Does anyone else know of another way to find the templates beginning/end in the source code?
 
Look at the contents of the thread_view template to see how it works and how many other templates are called (included).
 
I see. I was looking for something to indicate the beginning and ending of each template, as they're rendered or included in the page, the same way VB does it. I guess multiple <divs with the same ID wouldn't make much sense. I should have spotted that.
 
Top Bottom