This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit ezplatform.com

eZ Community » Forums » Setup & design » Is there a way to see which *.tpl...
expandshrink

Is there a way to see which *.tpl file a page uses?

Is there a way to see which *.tpl file a page uses?

Tuesday 30 October 2012 4:19:37 pm - 6 replies

I'm pretty new to eZ, I'm afraid. Unfortunately I've been placed in a situation where I, on my own, need to change a few tings in some template overrides made by someone else.
I've found the majority of the files I need to change because of their name, but now I'm stuck.
So, is there a way to figure out what's in use?

Tuesday 30 October 2012 4:36:34 pm

Yes, you need to enable debug results which are listed in the bottom. It is usually done by setting: DebugOutput=enabled in the [DebugSettings] section in the site.ini of your siteaccess. 

Then enable the listing with ShowUsedTemplates=enabled in the [TemplateSettings] section in the same site.ini

Tuesday 30 October 2012 9:38:53 pm

Thanks! That did the trick for products, when they are displayed as individual products.

I see now that I should have specified a bit more.

I still can't see what makes up what I see in the product categories. I can't see what that template is called. Or that "state" the products are in when they are displayed like a category. Was that at all possible to understand?

Under the "Templates used to render the page" I see, among others, /design/ezwebin/override/templates/full/product.tpl. In that file, I found a lot, but nothing indicating the category "state". (I know, it's not called that.)

Tuesday 30 October 2012 10:07:41 pm

Quote from Vidar G :

I still can't see what makes up what I see in the product categories. I can't see what that template is called. Or that "state" the products are in when they are displayed like a category. Was that at all possible to understand?

Under the "Templates used to render the page" I see, among others, /design/ezwebin/override/templates/full/product.tpl. In that file, I found a lot, but nothing indicating the category "state". (I know, it's not called that.)

I would guess that the tpl for category is /design/ezwebin/override/templates/full/folder.tpl but it depends on customization done on that site. The full template is usually shown first in the debug list.

Note that if you have Content View Cache enabled full templates results are cached so they are not used at all, hence they are not in list. So for development make sure that view cache is disabled. 

Wednesday 31 October 2012 10:06:03 am

Not only it is a good idea to disbale the view cache, but some templates will still be compiled into caches and thus not be listed in debug output at the end of every page.

The best way to make sure you seel listed all of them is to hit the "clear all caches" button then reload the page concerend.

PS: there is also a setting which will add comment tags where templates begin and end in your html.

Thursday 08 November 2012 12:59:06 pm

Thanks both. Helped a lot.

Haven't found the setting which will add comment tags where templates begin and end, though.

Thursday 08 November 2012 2:00:41 pm

Try ShowXHTMLCode=enabled

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from