参数信息
Request
属性:
网页参数:
#[[ #(Request.paraName) ]]#
#(Request.paraName)
网站信息
Site
属性:
网站标题:
#[[ #(Site.caption) ]]#
#(Site.caption)
网站副标题:
#[[ #(Site.subCaption) ]]#
#(Site.subCaption)
欢迎语:
#[[ #(Site.welcome) ]]#
#escape(Site.welcome)
方法:
返回网站首页地址:
#[[ #(Site.url()) ]]#
#(Site.url())
网站栏目
Channel
属性:
栏目别名:
#[[ #(Channel.code) ]]#
#(Channel.code)
栏目图标:
#[[ #(Channel.icon) ]]#
#(Channel.icon)
栏目图片:
#[[ #(Channel.pic) ]]#
#(Channel.pic)
栏目标题:
#[[ #(Channel.caption) ]]#
#(Channel.caption)
栏目副标题:
#[[ #(Channel.subCaption) ]]#
#(Channel.subCaption)
栏目内容:
#[[ #(Channel.content) ]]#
#escape(Channel.content)
栏目页模板:
#[[ #(Channel.channelTemp) ]]#
#(Channel.channelTemp)
文章页模板:
#[[ #(Channel.contentTemp) ]]#
#(Channel.contentTemp)
栏目层级:
#[[ #(Channel.path) ]]#
#(Channel.path)
栏目序号:
#[[ #(Channel.sort) ]]#
#(Channel.sort)
方法:
返回栏目地址:
#[[ #(Channel.url()) ]]#
#(Channel.url())
根据别名返回指定栏目:
#[[ #(Channel.by("Index")) ]]#
#(Channel.by("Index").caption)
返回首页栏目:
#[[ #(Channel.index()) ]]#
#(Channel.index().caption)
返回父栏目:
#[[ #(Channel.parent()) ]]#
#set(parent = Channel.parent()) #if(parent != null)
#(parent.caption)
#else 没有父栏目 #end
返回子栏目列表:
#[[ #(Channel.children()) ]]#
#for(child : Channel.children())
#(child.caption)
#else 没有子栏目 #end
返回栏目下第一条文章:
#[[ #(Channel.first()) ]]#
#set(first = Channel.first()) #if(first != null)
#(first.caption)(#date(first.mdate, "yyyy-MM-dd"))
#else 该栏目没有文章 #end
返回栏目下最后一条文章:
#[[ #(Channel.last()) ]]#
#set(last = Channel.last()) #if(last != null)
#(last.caption)(#date(last.mdate, "yyyy-MM-dd"))
#else 该栏目没有文章 #end
返回栏目下文章列表(最多条数、是否倒序、是否包含子栏目):
#[[ #(Channel.list(10, true, true)) ]]#
#for(item : Channel.list(10, true, true))
#(item.caption)(#date(item.mdate, "yyyy-MM-dd"))
#else 该栏目没有文章 #end
分页返回栏目下文章列表(当前页码、每页条数、是否倒序、是否包含子栏目):
#[[ #(Channel.page(1, 10, true, true)) ]]#
#set(page = Channel.page(1, 10, true, true))
记录总数:#(page.totalRow)
总页数:#(page.totalPage)
每页条数:#(page.pageSize)
当前页:#(page.pageNumber)
#for(item : page.list)
#(item.caption)(#date(item.mdate, "yyyy-MM-dd"))
#else 该栏目没有文章 #end
返回文章标题中含有指定关键字的文章列表(关键字、是否倒序、是否包含子栏目):
#[[ #(Channel.search("章", true, true)) ]]#
#for(item : Channel.search("章", true, true))
#(item.caption)(#date(item.mdate, "yyyy-MM-dd"))
#else 没有搜索到相关文章 #end
网站文章
Content
属性:
文章ID:
#[[ #(Content.id) ]]#
#(Content.id)
文章图片:
#[[ #(Content.pic) ]]#
#(Content.pic)
文章标题:
#[[ #(Content.caption) ]]#
#(Content.caption)
文章副标题:
#[[ #(Content.subCaption) ]]#
#(Content.subCaption)
文章概要:
#[[ #(Content.summary) ]]#
#(Content.summary)
文章作者:
#[[ #(Content.author) ]]#
#(Content.author)
文章内容:
#[[ #(Content.content) ]]#
#escape(Content.content)
文章日期:
#[[ #(Content.mdate) ]]#
#date(Content.mdate, "yyyy-MM-dd HH:mm:ss")
方法:
返回文章地址:
#[[ #(Content.url()) ]]#
#(Content.url())
根据ID返回文章:
#[[ #(Content.by("contentId..")) ]]#
#(Content.by("contentId..").caption??"文章ID不存在!")
返回下一篇文章:
#[[ #(Content.next()) ]]#
#(Content.next().caption??"下一篇文章不存在!")
返回上一篇文章:
#[[ #(Content.previous()) ]]#
#(Content.previous().caption??"上一篇文章不存在!")
返回文章所在的栏目:
#[[ #(Content.channel()) ]]#
#(Content.channel().caption??)
网站导航
Navi
方法:
根据别名返回导航明细:
#[[ #(Navi.by("main")) ]]#
#for(item : Navi.by("main"))
#(item.caption)
#else 没有导航明细数据 #end
NaviItem
属性:
导航名称:
#[[ #(NaviItem.caption) ]]#
#(NaviItem.caption??)
导航地址:
#[[ #(NaviItem.href) ]]#
#(NaviItem.href??)
导航打开方式:
#[[ #(NaviItem.target) ]]#
#(NaviItem.target??)
方法:
返回导航所对应的栏目:
#[[ #(NaviItem.channel()) ]]#
#(NaviItem.channel().caption??)
网站统计
Counter
方法:
整站统计(动态模式):
#[[ #(Site.counter()) ]]#
#(Site.counter())
整站统计(静态模式):
为元素增加
SITE-CNT-GLOBAL
样式类
在这里显示统计结果