高安全性的内容管理系统
一站式建站解决方案
高性能静态网站构建工具
精美的网站模板库
详细的模板开发指南
完整的API接口说明
直观的视频使用指南
常见问题解答集锦
最新产品动态与行业资讯
了解我们的故事
获取支持与合作
说明:当我们跟文档打上各种 tag 后,我们就可以用文档 Tag 列表标签来调用这些 Tag。
使用方法:{% tagList 变量名 with limit="10" %} 如将变量定义为 tags {% tagList tags with limit="10" %}...{% endtagList %}
{% tagList 变量名 with limit="10" %}
{% tagList tags with limit="10" %}...{% endtagList %}
itemId
itemId="0"
limit
offset
,
limit="2,10"
letter
categoryId
categoryId="分类ID"
categoryId="1,2,3"
siteId
tags 是一个数组对象,因此需要使用 for 循环来输出
for
Id
Title
Link
Description
FirstLetter
CategoryId
<div> 文档Tag: {% tagList tags with limit="10" %} {% for item in tags %} <a href="{{item.Link}}">{{item.Title}}</a> {% endfor %} {% endtagList %} </div>
文档 Tag 列表支持分页,但仅在模板 tag/index.html 内生效。
tag/index.html
<div> {% tagList tags with type="page" limit="20" %} <ul> {% for item in tags %} <li> <a href="{{item.Link}}"> <h5>{{item.Title}}</h5> <div>{{item.Description}}</div> </a> </li> {% empty %} <liå> 该列表没有任何内容 </li> {% endfor %} </ul> {% endtagList %} </div> {# 分页代码 #} <div> {% pagination pages with show="5" %} {# 首页 #} <a class="{% if pages.FirstPage.IsCurrent %}active{% endif %}" href="{{pages.FirstPage.Link}}">{{pages.FirstPage.Name}}</a> {# 上一页 #} {% if pages.PrevPage %} <a href="{{pages.PrevPage.Link}}">{{pages.PrevPage.Name}}</a> {% endif %} {# 中间多页 #} {% for item in pages.Pages %} <a class="{% if item.IsCurrent %}active{% endif %}" href="{{item.Link}}">{{item.Name}}</a> {% endfor %} {# 下一页 #} {% if pages.NextPage %} <a href="{{pages.NextPage.Link}}">{{pages.NextPage.Name}}</a> {% endif %} {# 尾页 #} <a class="{% if pages.LastPage.IsCurrent %}active{% endif %}" href="{{pages.LastPage.Link}}">{{pages.LastPage.Name}}</a> {% endpagination %} </div> </div>