I have a couple of node-view-X.tpl.php theme overrides that no longer work since upgrading to 2.2

Comments

hunthunthunt’s picture

Title: node-view-X.tpl.php theme override not longer works » node-view-X.tpl.php theme override no longer works
hunthunthunt’s picture

Looking in to this, I have discovered that the problem is with the date module.

See bug listed here:

http://drupal.org/node/348241

merlinofchaos’s picture

Status: Active » Closed (duplicate)
ravs_drupal’s picture

IT WORKED

Just add the views-view.tpl.php file in the theme directory ( You will get this file from the 'theme' folder under the 'Views' module folder i.e Views->theme) .( I wonder, why many of the people on community suggest to override the node.tpl.php file? Concepltually speaking, node,tpl.php file should be overridden for contentypes. For view the "views-view.tpl.php" file should be overriden). Then, just copy the content of this file and paste it into a newly created file and name it accordingly: "views-view--my-view name.tpl.php"

for example, for the view with name "my_testimonial_page" the file name shall be views-view--my-testimonial-page.tpl.php. Please note that the underscored in the view name are to be replaced by hyphens i.e '-' and there are double hyphens before the view name.

In the Views->theme directory you will get to see other views related tpl.php files that you can use to override, in order to customise specific elements of view like the view fileds, list, grid, table, etc.

Also, do not forget to call the function drupal_rebuild_theme_registry(); in template.php file under your theme's directory.

Ravish Dave