1

I have a view that uses node rows. I looked at views-view-row-node.tpl.php and it only contains 4 lines. I tried to override the theme by using my node.tpl.php code in a new file but got this warning:

Invalid argument supplied for foreach() in /home/public_html/sites/all/themes/templates/overrides/views-view-row-node--taxonomy-term-attachment.tpl.php on line 36.

How can I use a modified version of node.tpl.php to theme a certain display of my view?

2

You probably missunderstood the two different templates here

  • The node template(node.tpl.php): This is for rendering a specific node
  • views template This is for wrapping the node + comments

So all you have to do is to use the node.tpl.php to theme a single file.

| improve this answer | |

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.