For a magazine website I would like to create a content type (Magazine) that displays a View of content that contains the same Taxonomy for Issue (month) and Year as the parent node.

In short: A Magazine node is created with a few CCK fields (image, text) and two taxonomy vocabularies. In the display of the node, a list of all of the content with the same values in those taxonomies is shown.

I think the best way to do this is to create a View that presents the information the way I want, place PHP to call that view in the template for that node (contemplate or as a node-type.tpl.php) passing the taxonomy terms mentioned above on as arguments in the View.

First off, does that seem like the best way to go about this?

And second, what PHP would I use to place the View?

Comments

vsr’s picture

the panels module?

netbabu’s picture

Yes, Contemplate is a nice way to call the views. The code to call a particular view in Drupal 6 is:

//prints the views output in default mode
print views_embed_view($viewName);

You can embed the output of modes like:

print views_embed_view($viewName, 'page');
print views_embed_view($viewName, 'block');

-Babu
Promote Drupal with Tshirts/merchandise: http://paramprojects.com/drupalstore
Drupal Projects showcase: http://paramprojects.com/website/drupal-servicesprojects

StevenSokulski’s picture

Fantastic, thanks!

I've used Panels elsewhere, and found the ability to recreate them repeatedly less than ideal. However, this should work perfectly!