藏茗山學(xué)院
安全可靠、性能穩(wěn)定、追求極致的用戶體驗(yàn)
JEECMSv9.x常用功能標(biāo)簽大全
內(nèi)容頁
新聞內(nèi)容head
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<meta content="${content.tagStr!}" http-equiv="keywords" />
<meta content="${content.description!}" http-equiv="description"/>
<script src="${resSys}/jquery.js" type="text/javascript"></script>
<script src="${resSys}/front.js" type="text/javascript"></script>
<script type="text/javascript">
$(function() {
Cms.checkPerm("${base}","${content.id}");
Cms.collectCsi("${base}","collectCsiDiv","collect_csi","${content.id}");
Cms.attachment("${base}","${content.id}","${content.attachments?size}","attach");
Cms.viewCount("${base}","${content.id}");
Cms.siteFlow("${base}", location.href, document.referrer,"${site.config.flowSwitch?string}");
});
</script>
Head導(dǎo)入上述內(nèi)容
新聞內(nèi)容屬性
標(biāo)題${content.title}
發(fā)布時間${content.releaseDate}
作者:${content.author!'本站編輯'}
來源: <a target="_blank" href="${content.originUrl!}">${content.origin!'本站原創(chuàng)'}</a>
瀏覽次數(shù):<span id="views"></span>
收藏:<a id="collectCsiDiv"></a>
摘要 [@text_cut s=content.description len=‘50’ append=‘...’/]截取50位長度
內(nèi)容<div class="content">${txt!}</div>
內(nèi)容Tag關(guān)鍵詞:${content.tagStr!}
內(nèi)容分頁[#include "../style_page/content.html"/]
上一篇下一篇文章獲取方式
<ul>
<li><strong>上一篇:</strong>[@cms_content id=content.id next='1' channelId=channel.id][#if tag_bean??]<a href="${tag_bean.url}">${tag_bean.title}</a>[#else]沒有了[/#if][/@cms_content]</li>
<li><strong>下一篇:</strong>[@cms_content id=content.id next='0' channelId=channel.id][#if tag_bean??]<a href="${tag_bean.url}">${tag_bean.title}</a>[#else]沒有了[/#if][/@cms_content]</li>
</ul>
內(nèi)容URL:${content.url!}
內(nèi)容手機(jī)版url:${content.mobileUrl!}【在生成了手機(jī)版靜態(tài)頁的情況下才需要這么寫】
內(nèi)容URL:${content.UrlWhole!} 內(nèi)容地址全路徑 (包含域名端口)
內(nèi)容分頁數(shù):${content.pageCount!}
內(nèi)容簡短標(biāo)題:${content.stitle!}
內(nèi)容標(biāo)題顏色:${content.titleColor!}
是否加粗:[#if content.bold??] [#if content.bold]加粗[/#if] [/#if]
標(biāo)題圖:${content.titleImg!}
內(nèi)容圖:${content.contentImg!}
類型圖: ${content.typeImg!}
內(nèi)容1: ${content.txt1!}
內(nèi)容2: ${content.txt2!}
內(nèi)容3: ${content.txt3!}
瀏覽量: ${content.views!}
瀏覽量: ${content.viewsWeek!}
日瀏覽量: ${content.viewsDay!}
周瀏覽量: ${content.viewsMonth!}
評論數(shù): ${content.commentsCount!}
審核通過評論數(shù): ${content.commentsCheckedNum!}
頂數(shù): ${content.ups!}
踩數(shù): ${content.downs!}
所在欄目名稱: ${content.ctgName!}
所在欄目地址: ${content.ctgUrl!}
所在站點(diǎn)名稱: ${content.siteName!}
所在站點(diǎn)地址: ${content.siteUrl!}
是否新內(nèi)容:[#if content.new]新的[/#if]
二維碼圖片地址: ${content.codeImgUrl!}
所在欄目URL:${content.channel.url!} content.channel.xx xx可以是欄目對象的任何屬性可以獲取更多的欄目信息,當(dāng)然xx必須是欄目存在的屬性!!!
模型名稱:${content.model.name!} content.model.xx 可以獲取模型對象的任何屬性
站點(diǎn)名稱: ${content.site.name!} content.site.xx 可以獲取站點(diǎn)任何屬性
自定義該字段屬性:${content.attr. field! } field為新增模型項(xiàng)的字段
備注:新聞內(nèi)容屬性通用在任何新聞內(nèi)容頁,也可以運(yùn)用于內(nèi)容標(biāo)簽的循環(huán)內(nèi)
視頻新聞內(nèi)容
[#if content.mediaPath?? && content.mediaType??]
<p style="margin: 5px auto; text-align: center">
[#if content.mediaType=='FLV']
<object height="500" width="98%" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000">
<param name="movie" value="/${res}/img/flvplayer.swf" />
<param name="quality" value="high" />
<param name="allowFullScreen" value="true" />
<param name="FlashVars" value="vcastr_file=${content.mediaPath!}&BufferTime=3" /><embed height="500" width="98%" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" quality="high" flashvars="vcastr_file=${content.mediaPath!}" allowfullscreen="true" src="/${res}/img/flvplayer.swf"></embed>
</object>
[#elseif content.mediaType=='FLASH']
<embed height="500" width="98%" type="application/x-shockwave-flash" quality="high" src="${content.mediaPath}" wmode="transparent" align="center"></embed>
[#elseif content.mediaType=='CK']
<div id="video" style="position:relative;z-index: 100;width:960px;height:500px;float: left;"><div id="a1"></div></div>
<script type="text/javascript">
//函數(shù)名稱不允許更改 function ckmarqueeadv(){return '廣告內(nèi)容'};
var flashvars={f:'${content.mediaPath!}', c:0, b:1, p:2, i:'${content.titleImg!}', my_url:'${content.url!}', my_pic:'${content.titleImg!}'};
var video=['${content.mediaPath!}->video/mp4'];
CKobject.embed('${resSys}/ckplayer/ckplayer.swf','a1','ckplayer_a1','980','500',false,flashvars,video);
var box = new LightBox();
function closelights(){//關(guān)燈
box.Show();
}
function openlights(){//開燈
box.Close();
}
</script>
[#else]
<embed height="500" width="98%" type="video/x-ms-wmv" src="${content.mediaPath}" console="cons" controls="ImageWindow" autostart="true"></embed>
[/#if]
</p>
[/#if]
content.mediaPath上傳視頻的路徑,當(dāng)然各種類型的播放器可以自己自由更改
圖片新聞內(nèi)容
[#if pic??]
發(fā)布時間: ${content.releaseDate} | 瀏覽<span id="views"></span>次 </DIV>
${txt!}
[#list content.pictures as p]
<dl>
<dd><img src=”${p.imgPath!}”> ${p_index+1}</dd>
<span>${p.description!}</span>
</dl>
[/#list]
[#else]
尚未添加圖集圖片!
[/#if]
${p.imgPath}圖片路徑
${p.description!}圖片描述
${p_index+1}圖片索引
下載內(nèi)容
[#if content.attachments?size gt 0]
[#list content.attachments as attach]
<a id="attach${attach_index}"><img src="/${res}/img/download/down.gif" border="0"/>${attach. name !}</a> 下載次數(shù):${attach. count!}
[/#list]
[/#if]
attach${attach_index}下載鏈接id屬性
結(jié)合head里的javascript就會獲取到下載鏈接
${attach. name !}下載附件名稱
${attach. count!}下載次數(shù)