2

I successfully could create a template file for views field after reading this page.

https://api.drupal.org/api/views/theme!theme.inc/group/views_templates/6

However views-view-fields--myviewsname.tpl.php override all the displays in "myviewsname"

Is there any way I can make a template that overrides just one display in a View?

For example, a template that overrides just "display-1" in "myviewsname"

1 Answer 1

2

views-view-fields--myviewsname--display-1.tpl.php will do it, eg, views-view-fields--VIEWNAME--DISPLAYNAME.tpl.php. (Along with changing any underscores in the names to single dashes)

On the api page you reference, you can see this in their example as the display mentioned there is called page.

These and other template names can be easily discerned from clicking on the Theme Information link in the Style Settings in the Views UI.

1
  • Thank you. I hadn't realized the one mentioned "page" was the one. Now it work!
    – Sona7
    Jun 21, 2013 at 13:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.