Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
By jacksaghbazarian on
Hi, i want to change the output of my view "summary-sheet" by overriding views-view-fields.tpl.php. I
created a file named views-view-fields--Summary-Sheet.tpl.php as suggested in the Theming information, but its not overriding the original views-view-fields.tpl.php. What am i doing wrong?
Comments
Did you click the 'Rescan
Did you click the 'Rescan templates' button?
Thanks for the reply, I
Thanks for the reply, I clicked the rescan button, nothing changes.
That should have worked
That should have worked. Make sure you verify the name of the file and the location, the file has to reside in your theme folder.
Once you rescan templates, if everything is correct, then the newly recognized template will be in bold, which means that Drupal now recognizes it. Save the view and you should be good to go.
rescan does not highlight new specific tpl.php file
I am trying to add a tpl.php file for a view I have created. Under theming information, I have copied the one of the more specific names:
views-view-unformatted--MYVIEW.tpl.php
There is now a file of this name in the modules/views/theme folder. I have cleared all caches, rescanned, but still cannot get theming information to highlight the new file. I do not want to change the default views tpl.php files as these will apply to all views.
Can anybody help?I have looked on all the forums I can find & so far have come up with no solution.
Not in modules/views/theme....
Place the template file in your theme folder
i.e sites/all/themes/themename/views-view-unformatted--MYVIEW.tpl.php
Solved: How to override views .tpl.php - in the theme folder
Thank you Dharani,
that worked. Once I used the folder for the theme, the more specific .tpl.php files came up bold in theme information.
Paul