将词汇表中的术语显示为链接列表的块
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了将词汇表中的术语显示为链接列表的块相关的知识,希望对你有一定的参考价值。
This is a simple little block that displays a list of terms in a vocabulary as a list of links to /taxonomy/term/tid pages. Items are listed in the order set for the vocabulary. You could probably use the php sort() function to change that if desired.Be sure to change the $vid to reflect the vocabulary id of the vocabulary you wish to list. Also, you can change the "taxonomy/term/$term->tid" to any path you wish.
<?php /** * Lists terms for a specific vocabulary without descriptions. * Each term links to the corresponding /taxonomy/term/tid listing page. */ $vid = 1; $terms = taxonomy_get_tree($vid, 0, -1, 1); foreach($terms as $term){ $items[]= l($term->name, "taxonomy/term/$term->tid"); } return theme('item_list',$items); } ?>
以上是关于将词汇表中的术语显示为链接列表的块的主要内容,如果未能解决你的问题,请参考以下文章
Android:RecyclerView 不显示片段中的列表项