Using taxonomy_get_tree in Drupal;
@param $vid
* Which vocabulary to generate the tree for.
*
* @param $parent
* The term ID under which to generate the tree. If 0, generate the tree
* for the entire vocabulary.
*
* @param $depth
* Internal use only.
*
* @param $max_depth
* The number of levels of the tree to return. Leave NULL to return all levels.
*
* @return
* An array of all term objects in the tree. Each term object is extended
* to have "depth" and "parents" attributes in addition to its normal ones.
* Results are statically cached.
* Which vocabulary to generate the tree for.
*
* @param $parent
* The term ID under which to generate the tree. If 0, generate the tree
* for the entire vocabulary.
*
* @param $depth
* Internal use only.
*
* @param $max_depth
* The number of levels of the tree to return. Leave NULL to return all levels.
*
* @return
* An array of all term objects in the tree. Each term object is extended
* to have "depth" and "parents" attributes in addition to its normal ones.
* Results are statically cached.
$name = $taxo[0]->name;
$tid = $taxo[0]->tid;
$description= $taxo[0]->description;
@param $tid
* $tid is from taxonomy_get_tree.
* $tid is the parent id
$taxo_child = taxonomy_get_children($tid, $vid = 0, $key = 'tid')* $tid is from taxonomy_get_tree.
* $tid is the parent id
No comments:
Post a Comment