藏茗山学院
安全可靠、性能稳定、追求极致的用户体验
JEECMSv9.x常用功能标签大全
内容页
新闻内容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导入上述内容
新闻内容属性
标题${content.title}
发布时间${content.releaseDate}
作者:${content.author!'本站编辑'}
来源: <a target="_blank" href="${content.originUrl!}">${content.origin!'本站原创'}</a>
浏览次数:<span id="views"></span>
收藏:<a id="collectCsiDiv"></a>
摘要 [@text_cut s=content.description len=‘50’ append=‘...’/]截取50位长度
内容<div class="content">${txt!}</div>
内容Tag关键词:${content.tagStr!}
内容分页[#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>
内容URL:${content.url!}
内容手机版url:${content.mobileUrl!}【在生成了手机版静态页的情况下才需要这么写】
内容URL:${content.UrlWhole!} 内容地址全路径 (包含域名端口)
内容分页数:${content.pageCount!}
内容简短标题:${content.stitle!}
内容标题颜色:${content.titleColor!}
是否加粗:[#if content.bold??] [#if content.bold]加粗[/#if] [/#if]
标题图:${content.titleImg!}
内容图:${content.contentImg!}
类型图: ${content.typeImg!}
内容1: ${content.txt1!}
内容2: ${content.txt2!}
内容3: ${content.txt3!}
浏览量: ${content.views!}
浏览量: ${content.viewsWeek!}
日浏览量: ${content.viewsDay!}
周浏览量: ${content.viewsMonth!}
评论数: ${content.commentsCount!}
审核通过评论数: ${content.commentsCheckedNum!}
顶数: ${content.ups!}
踩数: ${content.downs!}
所在栏目名称: ${content.ctgName!}
所在栏目地址: ${content.ctgUrl!}
所在站点名称: ${content.siteName!}
所在站点地址: ${content.siteUrl!}
是否新内容:[#if content.new]新的[/#if]
二维码图片地址: ${content.codeImgUrl!}
所在栏目URL:${content.channel.url!} content.channel.xx xx可以是栏目对象的任何属性可以获取更多的栏目信息,当然xx必须是栏目存在的属性!!!
模型名称:${content.model.name!} content.model.xx 可以获取模型对象的任何属性
站点名称: ${content.site.name!} content.site.xx 可以获取站点任何属性
自定义该字段属性:${content.attr. field! } field为新增模型项的字段
备注:新闻内容属性通用在任何新闻内容页,也可以运用于内容标签的循环内
视频新闻内容
[#if content.mediaPath?? && content.mediaType??]
<p style="margin: 5px auto; text-align: center">
[#if content.mediaType=='FLV']
<object height="500" width="98%" codebase="//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="//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">
//函数名称不允许更改 function ckmarqueeadv(){return '广告内容'};
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(){//关灯
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上传视频的路径,当然各种类型的播放器可以自己自由更改
图片新闻内容
[#if pic??]
发布时间: ${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}图片索引
下载内容
[#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> 下载次数:${attach. count!}
[/#list]
[/#if]
attach${attach_index}下载链接id属性
结合head里的javascript就会获取到下载链接
${attach. name !}下载附件名称
${attach. count!}下载次数