I am a Views newbie and wish for a more advanced user to tell me if I am missing a step with altering a template file. I added a file to my sub-theme folder with a more specific name (that I found listed under Theme Information). This file name is highlighted, but the file is not used (I'm sure of this cuz I wrote some new lines to the template (<li>Like, Doah!</li>, etc.).

Some extra details...
1.) The view is fully created, has a menu entry, and displays an end user content page.
2) I am using fusion core with a fusion sub-theme (begot from fusion_starter). The fusion sub-theme is activated. I've not changed much.
3) I currently have only two "views-view-*" template files between the directories containing the two fusion themes.
* fusion_core/views-view--page.tpl.php (edits to this page ARE visible on the end user "content" page).

* fusion_my_subtheme/views-view--my-view--default.tpl.php (the trouble file)
-- Click Theme: Information to find "views-view--my-view--default.tpl.php" listed as the most specific file name available under Display output.
-- Theme Information highlights this template file name bold. And, when I renamed this file, the Theme Information display returned an error message that the file is missing--therefore I conclude the Drupal/Views app is finding this file.

Why, if this file name is highlighted in bold, is this more specific template file not being used by Drupal? What are the possible causes a custom Page Display created in the Views Module would not display changes to a view-named (in this case my-view) template file?

Maybe there is a convention of the naming syntax that does not accept some character combination (such as underscores, that sort of thing)?

Xtian

Comments

xtiansimon’s picture

Update after some more tests,
1) The above named trouble file, 'views-view--our-menu--default.tpl.php', was listed under the Display Output, yet this is actually a copy of the "list" template file ('/drupal/sites/all/modules/views/theme/views-view-list.tpl.php'). Since the code is exactly the same, I simply changed the name from views-view to views-view-list and appended the more specific name. The newly highlighted--more specific template--is now listed under Theme: Information > Style Output. This name change had no effect.

2) Again, the Views Module sees the more specific template in fusion_sub-theme folder. I repeated the same changes placing the more specific file in the fusion_core folder and this had no effect. The new template with a more specific file name can be located in either the main theme or a sub-theme directory. The Views module will see it but not use this template file.

3) The actual template file being used is '/drupal/sites/all/modules/views/theme/views-view-list.tpl.php'. Changes to this file are reflected in the end user display; however, copying this file in the same directory and changing the name to the more specific file name does not have an effect.

4) It is my experience in this buggy case there is no need to clear the cache or update the file name registry when making changes to a template file in "all/modules/views/theme".

I'm going to now look for a bug report. This behavior of the Views module is not what I expect given all reports the more specific file should be selected for display of the end user page.
X