gpt4 book ai didi

php - 从我的 Drupal 获取所有分类法

转载 作者:搜寻专家 更新时间:2023-10-31 20:53:23 25 4
gpt4 key购买 nike

有人知道如何从 Drupal 检索我的所有分类法列表吗?谢谢!

最佳答案

$vocabularies = taxonomy_get_vocabularies();

foreach ($vocabularies as $vocab) {
$terms = taxonomy_get_tree($vocab->vid, 0, -1, 1);
foreach($terms as $term){
$items[]= l($term->name, "taxonomy/term/$term->tid");
}
}

if(count($items)) {
return theme('item_list', $items);
}

关于php - 从我的 Drupal 获取所有分类法,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5244436/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com