获取Tag列表或分页。
实现类
com.jspxcms.core.web.directive.TagListDirective
com.jspxcms.core.web.directive.TagPageDirective
参数
- siteId:站点ID。多个用英文逗号分隔,如
'1,2,5'
。默认为当前站点,如果要获取所有站点的数据,可以传空字符串''
。 - refers:引用数量大于该值(指有多少文章使用了这个TAG)。
- node:节点编码。多个用英文逗号分隔,如
'foo,bar'
。 - nodeId:节点ID。多个用英文逗号分隔,如
'1,2,5'
。
范例
获取当前站点所有Tag列表
[@TagList;list]
[#list list as tag]
<a href="${ctx}/tag/${tag.id}">${tag.name}</a>
[/#list]
[/@TagList]
分页标签示例:
[@TagPage pageSize='20';pagedList]
[#list pagedList.content as tag]
<a href="${ctx}/tag/${tag.id}">${tag.name}</a>
[/#list]
[#--包含分页模板--]
[#include 'page.html'/]
[/@TagPage]