----- Original Message -----
Sent: Wednesday, November 23, 2005 4:29
PM
Subject: Re: [support] get parent
taxonomy tree?
I dont think I gave enough info, the hierarchy
tree is particularly important for people who use
taxonomy_menu.module
For eg, this is what I do..but am wondering if
there is an existing solution which also provides the vocab ID (my function
doesnt)
function
taxonomy_menu_returntree($tid)
{
$tree=$tid;
$query=mysql_query("select parent from
term_hierarchy where
tid=$tid");
$result=mysql_result($query,0);
while ($result !=0)
{
$tree = $result . "/"
. $tree ;
$query=mysql_query("select parent from term_hierarchy where
tid=$result");
$result=mysql_result($query,0);
}
return $tree;
}
----- Original Message -----
Sent: Wednesday, November 23, 2005 3:10
PM
Subject: [support] get parent taxonomy
tree?
Hi,
Is there a function to get the parent tree? for
example, the full path for term '15' is website.com/taxonomy_menu/3/10/15
.
Right now, I use taxonomy_get_parents(15) and
get to 10..then call it again until I find '0'. Is there a function that
either returns the full path of the term or returns the hierarchy tree?
taxonomy_get_parents_all seems to do something
completely different...
Thanks,
V
--
[ Drupal support list | http://lists.drupal.org/ ]
--
[ Drupal support list | http://lists.drupal.org/
]