{jv:include file='header.html' /}

CMS标签系统测试页面

本页面用于验证所有模板标签是否正常工作。如果标签正确渲染,说明标签系统运行正常。

1. artlist 标题长度截取 (titlelen=10)

{jv:artlist typeid="35" loop="3" orderby="new" titlelen="10"}

[{jv:autoindex}] {jv:title} | 完整标题: {jv:fulltitle} | 点击: {jv:arcclick} | 日期: {jv:add_time|MyDate='Y-m-d',###}

{/jv:artlist}

2. artlist 简介长度截取 (infolen=30)

{jv:artlist typeid="35" loop="3" orderby="new" infolen="30"}

[{jv:autoindex}] {jv:title}

{jv:description}

{/jv:artlist}

3. artlist 按热度排序 (orderby=hot)

{jv:artlist typeid="35" loop="5" orderby="hot"}

[{jv:autoindex}] {jv:title} | 点击: {jv:arcclick} | click标签: {jv:click}

{/jv:artlist}

4. artlist 偏移限制 (limit="1,2" 跳过1条取2条)

{jv:artlist typeid="35" limit="1,2" orderby="new"}

[{jv:autoindex}] {jv:title}

{/jv:artlist}

5. artlist 随机排序 (orderby=rand)

{jv:artlist typeid="35" loop="3" orderby="rand"}

[{jv:autoindex}] {jv:title}

{/jv:artlist}

6. artlist 按收藏数排序 (orderby=collect)

{jv:artlist typeid="35" loop="3" orderby="collect"}

[{jv:autoindex}] {jv:title} | 收藏: {jv:collectnum}

{/jv:artlist}

7. cn_substr 函数 (截取标题前3字)

{jv:artlist typeid="35" loop="3" orderby="new"}

{jv:title|cn_substr='3',###} | 原标题: {jv:fulltitle}

{/jv:artlist}

8. text_overflow 函数 (超长标题省略号, 截取3字)

{jv:artlist typeid="35" loop="3" orderby="new"}

{jv:title|text_overflow='3',###} | 原标题: {jv:fulltitle}

{/jv:artlist}

9. nav 标签 autoindex + currentstyle

{jv:nav type="top" row="5" currentstyle="current-nav"} [{jv:autoindex}] {jv:typename} {/jv:nav}

10. typelist 标签 - 所有顶级分类

{jv:typelist type="top" row="10"} [{jv:autoindex}] {jv:typename} {/jv:typelist}

11. typelist 标签 - 子分类 (type=son typeid=28)

{jv:typelist type="son" typeid="28" row="10"} [{jv:autoindex}] {jv:typename} {jv:else /} 暂无子分类 {/jv:typelist}

12. typelist 标签 - 空数据else测试 (typeid=999)

{jv:typelist type="son" typeid="999" row="10"} [{jv:autoindex}] {jv:typename} {jv:else /} 暂无子分类(else生效) {/jv:typelist}

13. flink 友情链接标签

{jv:flink row="10"} [{jv:autoindex}] {jv:title} {jv:else /} 暂无友情链接 {/jv:flink}

14. tagcloud 标签云

{jv:tagcloud num="15"} {jv:tag}({jv:field.count}) {jv:else /} 暂无标签云数据 {/jv:tagcloud}

15. hotsearch 热门搜索

{jv:hotsearch num="5" model="home"} [{jv:autoindex}] {jv:tag} {jv:else /} 暂无热门搜索词 {/jv:hotsearch}

16. count 文章计数标签

栏目35文章总数: {jv:count typeid="35"/} 篇

栏目49文章总数: {jv:count typeid="49"/} 篇

全站文章总数: {jv:count typeid="0"/} 篇

17. artlist row 别名测试 (row=2 等同 loop=2)

{jv:artlist typeid="35" row="2" orderby="new"}

[{jv:autoindex}] {jv:title}

{/jv:artlist}

18. 新值标签测试 (click/pubdate/id/typenameurl)

{jv:artlist typeid="35" loop="3" orderby="new"}

ID: {jv:id} | 标题: {jv:title} | 点击: {jv:click} | 发布时间: {jv:pubdate} | 格式化日期: {jv:pubdate|MyDate='Y/m/d',###} | 栏目URL: {jv:typenameurl} | 作者: {jv:author}

{/jv:artlist}

19. field 字段访问测试 (field.xxx 和 .xxx 格式)

{jv:artlist typeid="35" loop="2" orderby="new"}

field.id: {jv:field.id} | field.title: {jv:field.title} | .id: {jv:.id} | .category_id: {jv:.category_id} | .clicks: {jv:.clicks} | .flags: {jv:.flags}

{/jv:artlist}

20. artlist 空数据else测试 (typeid=999)

{jv:artlist typeid="999" loop="3" orderby="new"}

[{jv:autoindex}] {jv:title}

{jv:else /}

暂无数据(else生效)

{/jv:artlist}

21. artlist idlist 指定文章ID

{jv:artlist idlist="1,2,3" loop="3" orderby="aid"}

[{jv:autoindex}] {jv:title} | ID: {jv:id}

{jv:else /}

暂无指定ID的文章

{/jv:artlist}

22. artlist subday 近365天文章

{jv:artlist typeid="35" loop="5" orderby="new" subday="365"}

[{jv:autoindex}] {jv:title} | 日期: {jv:add_time|MyDate='Y-m-d',###}

{jv:else /}

暂无数据

{/jv:artlist}

23. artlist week 本周热门

{jv:artlist typeid="35" loop="5" orderby="week"}

[{jv:autoindex}] {jv:title} | 点击: {jv:click}

{jv:else /}

本周暂无热门文章

{/jv:artlist}

24. artlist month 本月热门

{jv:artlist typeid="35" loop="5" orderby="month"}

[{jv:autoindex}] {jv:title} | 点击: {jv:click}

{jv:else /}

本月暂无热门文章

{/jv:artlist}

25. artlist keyword 关键词搜索

{jv:artlist loop="5" orderby="new" keyword="33"}

[{jv:autoindex}] {jv:title}

{jv:else /}

暂无包含关键词的数据

{/jv:artlist}

26. artlist flag 属性过滤

{jv:artlist typeid="35" loop="5" orderby="new" flag="c"}

[{jv:autoindex}] {jv:title} | flags: {jv:.flags}

{jv:else /}

暂无推荐文章(flag=c)

{/jv:artlist}

27. if 条件判断标签

{jv:artlist typeid="35" loop="3" orderby="hot"}

[{jv:autoindex}] {jv:title} | 点击:{jv:click} {jv:if condition='(clicks > 3)'} [热门] {jv:else /} [普通] {/jv:if}

{/jv:artlist}

28. forumlist 论坛帖子 (titlelen=10)

{jv:forumlist num="5" orderby="new" titlelen="10"}

[{jv:autoindex}] {jv:title} | 完整: {jv:fulltitle} | 点击: {jv:arcclick} | 回复: {jv:replynum}

{jv:else /}

暂无论坛帖子

{/jv:forumlist}

29. qahotlist 热门问答

{jv:qahotlist num="5"}

[{jv:autoindex}] {jv:title} | 点击: {jv:arcclick} | 回答: {jv:replynum}

{jv:else /}

暂无热门问答

{/jv:qahotlist}

30. qanewlist 最新问答

{jv:qanewlist num="5"}

[{jv:autoindex}] {jv:title} | 栏目: {jv:typename} | 点击: {jv:arcclick}

{jv:else /}

暂无最新问答

{/jv:qanewlist}

31. mallproductlist 商城产品

{jv:mallproductlist num="4"}

[{jv:autoindex}] {jv:title} | 价格: {jv:price}

{jv:else /}

暂无商城产品

{/jv:mallproductlist}

32. 全局变量和语言标签

站点名称: {jv:global name='site_name' /}

站点URL: {jv:global name='url' /}

语言标签 home: {jv:lang name='home' /}

语言标签 search: {jv:lang name='search' /}

33. beafter 上一篇/下一篇

上一篇: {jv:beafter get='pre'} {jv:title} {jv:else /} 没有上一篇了 {/jv:beafter}

下一篇: {jv:beafter get='next'} {jv:title} {jv:else /} 没有下一篇了 {/jv:beafter}

{jv:include file='footer.html' /}