發(fā)表日期:2018-06 文章編輯:小燈 瀏覽次數(shù):2902
模型標(biāo)簽:[@cms_advertising id=’1]
參數(shù)詳解:
id:廣告id,必選
廣告對象屬性
percent 轉(zhuǎn)化率=點(diǎn)擊數(shù)/展現(xiàn)數(shù)
name:名稱
category:類型 image、flash、text、code 分別是圖片、flash、文本、代碼類型
code:廣告代碼,在category為code類型時候 該項(xiàng)有值
weight:權(quán)重
displayCount:展現(xiàn)次數(shù)
clickCount:點(diǎn)擊次數(shù)
startTime:開始時間
endTime:結(jié)束時間
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]
簡單的調(diào)用方式
${base}/ad.jspx?id=1 調(diào)用具體某個廣告
還可以按照廣告版位來調(diào)用廣告,這樣可以實(shí)現(xiàn)按照區(qū)位來展現(xiàn)多個廣告輪換展示
${base}/adspace.jspx?id=1 調(diào)用廣告版位id為1的廣告,若該區(qū)位有多個廣告,將按照廣告的權(quán)重來展示,若A廣告權(quán)重2 B廣告權(quán)重1 那么A廣告出現(xiàn)次數(shù)大約是B的2倍
例如:
<script src="${base}/ad.jspx?id=1"></script>
日期:2018-06 瀏覽次數(shù):3620
日期:2018-06 瀏覽次數(shù):3195
日期:2018-06 瀏覽次數(shù):3312
日期:2018-06 瀏覽次數(shù):3095
日期:2018-06 瀏覽次數(shù):3474
日期:2018-06 瀏覽次數(shù):3279
日期:2018-06 瀏覽次數(shù):3089
日期:2018-06 瀏覽次數(shù):3403
日期:2018-06 瀏覽次數(shù):3244
日期:2018-06 瀏覽次數(shù):3872
日期:2018-06 瀏覽次數(shù):2879
日期:2018-06 瀏覽次數(shù):2901
日期:2018-06 瀏覽次數(shù):3182
日期:2018-06 瀏覽次數(shù):2923
日期:2018-06 瀏覽次數(shù):2652
日期:2018-06 瀏覽次數(shù):2820
日期:2018-06 瀏覽次數(shù):3100
日期:2018-06 瀏覽次數(shù):2829
日期:2018-06 瀏覽次數(shù):2698
日期:2018-06 瀏覽次數(shù):2768
日期:2018-06 瀏覽次數(shù):2698
日期:2018-06 瀏覽次數(shù):2655
日期:2018-06 瀏覽次數(shù):2766
日期:2018-06 瀏覽次數(shù):2907
日期:2018-06 瀏覽次數(shù):3039
日期:2018-06 瀏覽次數(shù):2767
日期:2018-06 瀏覽次數(shù):2888
日期:2018-06 瀏覽次數(shù):2992
日期:2018-06 瀏覽次數(shù):2837
日期:2018-06 瀏覽次數(shù):2792
Copyright ? 2013-2018 Tadeng NetWork Technology Co., LTD. All Rights Reserved.