By masande on
there are a lot of useful functions included as part of the taxonomy module and the taxonomy_context module. these would allow me to gather and display some contextual information for any of my nodes. the problem is i haven't found a way to pass either the node's tid or vid as a parameter to these functions.
is there a way to get the current node's tid or vid? and once gathered, how would i pass that info to the function?
thanks a bunch for your help. this info will really help me jumpstart my first drupal site.
Comments
Where is it you want to get
Where is it you want to get the current node's tid or vid? A PHPTemplate theme, some module, a block?
Include som code examples and it will be easier to give advice.
I guess a PHPTemplate theme?
Actually I am trying to get the TID and VID when I display a node. Definitely not from a module or a block, however. I've been using the following hacked code to get the current node's TID so I can pass it to various functions for output:
Since all of my nodes only belong to a single term I only get a single TID returned from the previous technique.
Is there a shorter ad more direct to get this info?
Thanks again for the help.
Mark Sanders
Q Collective
In a template.php for your PHPTemplate theme
i pasted this function in my
i pasted this function in my template.php but it completely broke my theme. i'm running a phptemplate theme in 5.3. has it worked for anyone else?
i'm also trying to get a node's term id, and have explained this in more detail in another post http://drupal.org/node/191111
guess i'll keep lookin.
peace.
-r
echo arg(2);
echo arg(2);
My Drupal sites: