0

I am working on a drupal 7 installation. This has a content type called Team. In Structure > Views there is a view called Team content. In the folder structure there is also a corresponding view file named node--view--team.tpl.php which renders the Team content.

My task is to duplicate the content type to a new content type called Managers. So I created a new content type called Managers with all the same fields as in Team. I cloned the Team view as well. I then copied over the team tpl file into a new file named node--view--managers.tpl.php.

The problem I am facing is that the manager tpl file is not used when drupal renders the content. It falls back to node.tpl.php - however the design of this page is not how I want it.

What am I missing here? Is there any place in the code/ admin interface where I can specify that node--view--manager.tpl.php should be used instead of node.tpl.php?

Any pointers are greatly appreciated!

1

Your theme may create node--view--CONTENTTYPE.tpl.php but per content type theme suggestions are not provided out of the box. Your theme layer or a custom module typically provides the theme suggestion, there are a ton of tutorials online about this.

I recommend installing Devel Themer to inspect the View theme template file usage on the page for Teams. Then see why/if the Managers is failing by visiting that page.

Then look through your theme sourcecode and custom modules to see what is providing the hook_theme suggestions.

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.