藏茗山學(xué)院
安全可靠、性能穩(wěn)定、追求極致的用戶體驗(yàn)
JEECMSv9.x常用功能標(biāo)簽大全
專題分頁(yè) [@cms_topic_page]
專題分頁(yè)標(biāo)簽
[@cms_topic_page channelId=’1’ recommend=’1’ count='2' descLen='50' append='...']
參數(shù)詳解:
channelId:欄目ID 非必選
recommend:是否推薦 0全部 1推薦的 非必選
count :每頁(yè)分頁(yè)數(shù)
作用:對(duì)頁(yè)面顯示的專題列表進(jìn)行分頁(yè)
具體例子:
<div class="pagebar" style="margin:30px auto;">
[@cms_topic_page count='2' descLen='50' append='...']
<div class="pagebar" >
[#list tag_pagination.list as t]
<dl class="list line zt">
<dt><a href="${base}/topic/${t.id}.jspx" target="_blank">${t.name}</a></dt>
<dd class="pic"><a href="${base}/topic/${t.id}.jspx"><img src="${t.titleImg!site.defImg}"/></a></dd>
<dd class="text">[@text_cut s=t.description len=descLen append=append/]</dd>
</dl>
[/#list]
</div>
<div>[@cms_pagination sysPage='1'/]</div>
[/@cms_topic_page]
</div>
專題對(duì)象屬性
name:專題名稱
shortName:簡(jiǎn)稱
keywords:關(guān)鍵詞
description:描述
titleImg:標(biāo)題圖
contentImg:內(nèi)容圖
priority:排序
recommend:是否推薦
專題列表 [@cms_topic_list]
專題列表標(biāo)簽
[@cms_topic_list channelId=’1’ recommend=’1’ count='2' descLen='50' append='...']
參數(shù)詳解:
參數(shù)和cms_topic_page標(biāo)簽相同,只是cms_topic_list標(biāo)簽體內(nèi)不能插入分頁(yè)標(biāo)簽[@cms_pagination sysPage='1'/]
count:列表獲取的專題數(shù)量
評(píng)論分頁(yè) [@cms_comment_page]
評(píng)論分頁(yè)標(biāo)簽
[@cms_comment_page siteId =‘1’contentId=‘1’ greaterThen=‘0’ checked=‘1’ recommend =‘1’ count='6' orderBy='1 ']
參數(shù)詳解:
siteId:站點(diǎn)id,非必選
contentId:內(nèi)容ID,非必選
greaterThen: 評(píng)論內(nèi)容最大支持大于多少,非必選
checked: 是否需要審核,1審核通過的,0 全部 非必選 默認(rèn)全部
recommend:是否推薦,1推薦的,0 全部 非必選 默認(rèn)全部
parentId:上級(jí)評(píng)論ID 優(yōu)先級(jí)大于contentId若是出現(xiàn)了parentId ,contentId參數(shù)無效
count:分頁(yè)數(shù)
orderBy:排列順序:0 :按評(píng)論時(shí)間降序 1 :按評(píng)論時(shí)間升序。默認(rèn)降序
若是parentId contentId siteId都沒有,則默認(rèn)當(dāng)前站點(diǎn)的評(píng)論
在內(nèi)容頁(yè)模板中可以將contentId 設(shè)置成content.id,讀取本內(nèi)容下的評(píng)論
作用:對(duì)評(píng)論分頁(yè)讀取
具體例子:
<div class="pagebar">
[@cms_comment_page contentId=content.id count='6' orderBy='1']
<dl class="rmpl">
[#if tag_pagination.list?size = 0]
<dt><span>暫無相關(guān)評(píng)論!</span></dt>
[#else]
[#list tag_pagination.list as c]
<dt><span>${(c.commentUser.username)!"匿名網(wǎng)友"}</span>于 ${c.createTime} 評(píng)論道:</dt>
<dd>${c.textHtml!}</dd>
<dd class="line"></dd>
[/#list]
<div class="pagebar">[@cms_pagination sysPage='1'/]</div>
[/#if]
</dl>
[/@cms_comment_page]
</div>
評(píng)論對(duì)象屬性
textHtml:評(píng)論內(nèi)容
replayHtml:回復(fù)內(nèi)容
ip:評(píng)論者ip地址
createTime:評(píng)論時(shí)間
replayTime:回復(fù)時(shí)間
ups:頂數(shù)
downs:踩數(shù)
recommend:是否推薦
checked:是否審核
replyCount:回復(fù)數(shù)
replayUser:回復(fù)用戶對(duì)象 例如獲取回復(fù)管理員用戶名${c. replayUser.username!}
commentUser:評(píng)論用戶對(duì)象 例如${c. commentUser.username!}
parent:父級(jí)評(píng)論對(duì)象 例如${c. parent.username!}
評(píng)論列表 [@cms_comment_list]
評(píng)論列表標(biāo)簽
[@cms_comment_list siteId =‘1’contentId=‘1’ greaterThen=‘0’ checked=‘1’ recommend =‘1’ count='6' orderBy='1 ']
參數(shù)和cms_comment_page標(biāo)簽一致,只是不能標(biāo)簽體內(nèi)不能插入分頁(yè)標(biāo)簽
具體例子:
<div class="blue_right_top"><h2><a href="#" target="_blank">熱門評(píng)論</a></h2></div>
<div class="blue_right_div">
[@cms_comment_list siteId='1' count='5' recommend='1' textLen='50' append='...']
<dl class="rmpl">
[#list tag_list as c]
<dt><span>${(c.commentUser.username)!"匿名網(wǎng)友"}</span>對(duì)<a href="${c.content.url}" target="_blank">${c.content.title}</a>評(píng)論道:</dt>
<dd>[@text_cut s=c.textHtml len=textLen append=append/]</dd>
<dd class="line"></dd>
[/#list]
</dl>
[/@cms_comment_list]
</div>