Drupal: Content in blocks from node_reference fields?

Posted by Marco on Stack Overflow See other posts from Stack Overflow or by Marco
Published on 2010-02-17T14:30:25Z Indexed on 2010/04/07 7:43 UTC
Read the original article Hit count: 342

After only a few weeks of working with Drupal I've come up with a recurring problem, which I don't really have an optimal solution to, so I'm hoping that someone here might be able to give some best practice pointers.

What I have is a region inside my node.tpl.php, which is populated with blocks that display content from two different CCK fields of the type node_reference. This works fine when displaying a single node. The problem appears when I need to use a view.

For example, lets say I have a news listing, and a single news item view. When I display the single news item I can use the news node node_reference field to reference whatever material I would like to have in my sidebar, but when on the news listing view I would like to reference nodes separately. What would be the best practice to solve this?

I'm having a few ideas, but none seem like the logical choice, how would you do?

© Stack Overflow or respective owner

Related posts about drupal

Related posts about drupal-views