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?

1 Answer 1

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.

Your Answer

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

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