从我的 Drupal 获取所有分类法

发布于 2024-10-21 03:54:04 字数 38 浏览 3 评论 0原文

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

Someone a idea how that I can retrieve all my Taxonomy list from Drupal?
thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

北城挽邺 2024-10-28 03:54:05
$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);
}
$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);
}
⒈起吃苦の倖褔 2024-10-28 03:54:05

您是否正在考虑类似 taxonomy_get_vocabularies()

Are you thinking about something like taxonomy_get_vocabularies()?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文