0

I created a new views page which lists specific content types(products). And i have specific node node--products.tpl template file which is being used in views. I want to be able to use specific node template for views. How do i do that?

1

In the Other section of the views edit form, there is a link "Theme: Information." Inside that link there is a list of the many ways to template the view output. As always when theming, you start by copying the base file (e.g., views-view-unformatted.tpl.php), and make your modifications to the copy. Follow the naming conventions given in the link exactly. It can sometimes be tricky to get the dashes correct. Double-dashes are used to separate sections within the filename but single dashes are used to replace single underscores in content names. For example, for a content type named article_ratings, the template file would be named views-view-unformatted--article-ratings--default.tpl.php.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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