Hello everyone,

I have a node that (as an example) represents a restaurant.
• vocabulary list (restaurant_list).
• content type restaurant (select term restaurant_list mandatory)
With the following input fields:
- Description
- Specifications
• content type menu (select term restaurant_list mandatory)
• content type contact information (select term restaurant_list mandatory)

I am lost in the views... how can I tell views that when the user is in a restaurant page, it shows the menus and contact information belonging to THAT restaurant (taxonomy ID of the vocabulary restaurant_list I guess)?

Contact information is seperate as it's shown in another region of the page. So once again, how do I get the taxonomy ID of the vocabulary restaurant_list to show the correct contact information?

This has probably been answered a million times but I simply cannot find a simple answer....

Thanks in advance.

Comments

teebo’s picture

THis is the way I found to get the menu (as in restaurant menu) information.

Is there a better way??

I used the contemplate module and added the following PHP (I could have changed the node.tpl.php also).
Here is the code.

if (is_numeric(arg(1)) ) {

$nid = (int)arg(1);

$sql = "SELECT title, body FROM node_revisions WHERE nid IN (SELECT nid FROM term_node WHERE tid IN (SELECT tid FROM term_node WHERE nid = $nid) AND nid != $nid)";

$result = db_query($sql);
    
if (mysql_num_rows($result)) {
while ($anode = db_fetch_object($result)) { $output =  $anode->body; }
}

print $output;
}

Thanks for your comments and enlightenment.