欢迎您光临深圳塔灯网络科技有限公司!
电话图标 余先生:13699882642

JEECMS V8.1标签使用之[@cms_advertising]

发表日期:2018-06 文章编辑:小灯 浏览次数:2342

模型标签:[@cms_advertising id=’1]

参数详解:

id:广告id,必选

广告对象属性

percent 转化率=点击数/展现数

name:名称

category:类型 image、flash、text、code 分别是图片、flash、文本、代码类型

code:广告代码,在category为code类型时候 该项有值

weight:权重

displayCount:展现次数

clickCount:点击次数

startTime:开始时间

endTime:结束时间

enabled:是否禁用

具体例子:

[@cms_advertising id='1']

[#if tag_bean??]

[#if tag_bean.category=="image"]

[#assign html]

<a href="${( tag_bean.attr.image_link)!}" target="${ tag_bean.attr.image_target!}" title="${(tag_bean.attr.image_title)!}">

<img src="${tag_bean.attr.image_url}" border="0"[#if (tag_bean.attr.image_width)??] width="${tag_bean.attr.image_width}"[/#if][#if (tag_bean.attr.image_height)??] height="${tag_bean.attr.image_height}"[/#if]/>

</a>

[/#assign]

${html!}

[#elseif tag_bean.category=="flash"]

[#assign html]

<embed type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" play="true" loop="true" menu="true"

src="${(tag_bean.attr.flash_url)!}"[#if tag_bean.attr.flash_width?? && tag_bean.attr.flash_width!=""] width="${tag_bean.attr.flash_width}"[/#if][#if tag_bean.attr.flash_height?? && tag_bean.attr.flash_height!=""] height="${tag_bean.attr.flash_height}"[/#if]></embed>

[/#assign]

${html!}

[#elseif tag_bean.category=="text"]

[#assign html]

<a href="${(tag_bean.attr.text_link)!}" target="${(tag_bean.attr.text_target)!}">

<span style="[#if (tag_bean.attr.text_color)??]color:${tag_bean.attr.text_color};[/#if][#if (tag_bean.attr.text_font)??]font-size:${tag_bean.attr.text_font};[/#if]">${(tag_bean.attr.text_title)!}</span>

</a>

[/#assign]

${html!}

[#elseif tag_bean.category=="code"]

${tag_bean.code!}

[#else]

未知的广告类型:${tag_bean.category!}

[/#if]

[#else]

广告不存在"

[/#if]

[/@cms_advertising]

简单的调用方式

${base}/ad.jspx?id=1 调用具体某个广告

还可以按照广告版位来调用广告,这样可以实现按照区位来展现多个广告轮换展示

${base}/adspace.jspx?id=1 调用广告版位id为1的广告,若该区位有多个广告,将按照广告的权重来展示,若A广告权重2 B广告权重1 那么A广告出现次数大约是B的2倍

例如:

<script src="${base}/ad.jspx?id=1"></script>


本页内容由塔灯网络科技有限公司通过网络收集编辑所得,所有资料仅供用户参考了本站不拥有所有权,如您认为本网页中由涉嫌抄袭的内容,请及时与我们联系,并提供相关证据,工作人员会在5工作日内联系您,一经查实,本站立刻删除侵权内容。本文链接:http://www.dengtar.com/5061.html
相关cms文章
 八年  行业经验

多一份参考,总有益处

联系深圳网站公司塔灯网络,免费获得网站建设方案及报价

咨询相关问题或预约面谈,可以通过以下方式与我们联系

业务热线:余经理:13699882642

Copyright ? 2013-2018 Tadeng NetWork Technology Co., LTD. All Rights Reserved.