Help with GlobalNode

davenewton - June 20, 2007 - 11:54
Project:GlobalNode
Version:5.x-1.x-dev
Component:Miscellaneous
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed
Description

i need a block that can read the taxonomy term from the page it is displayed on and display links to a different content type which shares the same term.

i have set up a view which will only show a certain content type, so surely i just need to configure the block, I have played around with this for ages and got nowhere, any ideas please?

#1

dllh - June 28, 2007 - 12:42

There was a bug in the code that was preventing the attributes from loading as expected. Get the new version from http://cvs.drupal.org/viewcvs/*checkout*/drupal/contributions/modules/gl... . Then, you'd do the following:

- in globalnode admin, add taxonomy to the list of attributes saved
- in your block, do something like this:

<?php
if($GLOBALS['globalnode']->taxonomy){
 
$tax = array_pop($GLOBALS['globalnode']->taxonomy);
}
?>

That'd give you the last category applied to a node. If you want to do multiple categories, you'd iterate over the taxonomy attribute, naturally. Then you could use vid and tid for each taxonomy value to get similar nodes.

#2

dllh - June 28, 2007 - 12:43
Status:active» closed
 
 

Drupal is a registered trademark of Dries Buytaert.