高安全性的内容管理系统
一站式建站解决方案
高性能静态网站构建工具
精美的网站模板库
详细的模板开发指南
完整的API接口说明
直观的视频使用指南
常见问题解答集锦
最新产品动态与行业资讯
了解我们的故事
获取支持与合作
说明:用于获取指定 Tag 的文档列表
使用方法:{% tagDataList 变量名称 with tagId="1" %} 如将变量定义为 archives {% tagDataList archives with tagId="1" %}...{% endtagDataList %}
{% tagDataList 变量名称 with tagId="1" %}
{% tagDataList archives with tagId="1" %}...{% endtagDataList %}
tagId
tagId="1"
如果未指定 tagId 它会尝试读取当前 Tag 页面的 TagID。
moduleId
moduleId="1"
order
order="id desc"
order="views desc"
order="sort desc"
limit
limit="10"
offset
,
limit="2,10"
type
type="list"
type="page"
pagination
{% pagination pages with show="5" %}
siteId
archives 是一个数组对象,因此需要使用 for 循环来输出
for
Id
Title
SeoTitle
Link
Keywords
Description
ModuleId
CategoryId
CanonicalUrl
UserId
Price
Stock
ReadLevel
OriginUrl
Views
Images
Logo
Thumb
CommentCount
CreatedTime
{{stampToDate(item.CreatedTime, "2006-01-02")}}
UpdatedTime
{{stampToDate(item.UpdatedTime, "2006-01-02 15:04:05")}}
{# page 分页列表展示 #} <div> {% tagDataList archives with type="page" limit="10" %} {% for item in archives %} <li> <a href="{{item.Link}}"> <h5>{{item.Title}}</h5> <div>{{item.Description}}</div> <div> <span>{% categoryDetail with name="Title" id=item.CategoryId %}</span> <span>{{stampToDate(item.CreatedTime, "2006-01-02")}}</span> <span>{{item.Views}} 阅读</span> </div> </a> {% if item.Thumb %} <a href="{{item.Link}}"> <img alt="{{item.Title}}" src="{{item.Thumb}}"> </a> {% endif %} </li> {% empty %} <li> 该列表没有任何内容 </li> {% endfor %} {% endtagDataList %} {# 分页代码 #} <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>