發(fā)表日期:2018-06 文章編輯:小燈 瀏覽次數(shù):2858
模型標(biāo)簽:[@cms_advertising id=’1]
參數(shù)詳解:
id:廣告id,必選
廣告對(duì)象屬性
percent 轉(zhuǎn)化率=點(diǎn)擊數(shù)/展現(xiàn)數(shù)
name:名稱
category:類型 image、flash、text、code 分別是圖片、flash、文本、代碼類型
code:廣告代碼,在category為code類型時(shí)候 該項(xiàng)有值
weight:權(quán)重
displayCount:展現(xiàn)次數(shù)
clickCount:點(diǎn)擊次數(shù)
startTime:開始時(shí)間
endTime:結(jié)束時(shí)間
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]
簡(jiǎn)單的調(diào)用方式
${base}/ad.jspx?id=1 調(diào)用具體某個(gè)廣告
還可以按照廣告版位來調(diào)用廣告,這樣可以實(shí)現(xiàn)按照區(qū)位來展現(xiàn)多個(gè)廣告輪換展示
${base}/adspace.jspx?id=1 調(diào)用廣告版位id為1的廣告,若該區(qū)位有多個(gè)廣告,將按照廣告的權(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ù):3564
日期:2018-06 瀏覽次數(shù):3141
日期:2018-06 瀏覽次數(shù):3270
日期:2018-06 瀏覽次數(shù):3044
日期:2018-06 瀏覽次數(shù):3396
日期:2018-06 瀏覽次數(shù):3229
日期:2018-06 瀏覽次數(shù):3041
日期:2018-06 瀏覽次數(shù):3350
日期:2018-06 瀏覽次數(shù):3181
日期:2018-06 瀏覽次數(shù):3823
日期:2018-06 瀏覽次數(shù):2828
日期:2018-06 瀏覽次數(shù):2857
日期:2018-06 瀏覽次數(shù):3131
日期:2018-06 瀏覽次數(shù):2872
日期:2018-06 瀏覽次數(shù):2595
日期:2018-06 瀏覽次數(shù):2776
日期:2018-06 瀏覽次數(shù):3057
日期:2018-06 瀏覽次數(shù):2776
日期:2018-06 瀏覽次數(shù):2654
日期:2018-06 瀏覽次數(shù):2727
日期:2018-06 瀏覽次數(shù):2641
日期:2018-06 瀏覽次數(shù):2602
日期:2018-06 瀏覽次數(shù):2713
日期:2018-06 瀏覽次數(shù):2860
日期:2018-06 瀏覽次數(shù):2988
日期:2018-06 瀏覽次數(shù):2723
日期:2018-06 瀏覽次數(shù):2836
日期:2018-06 瀏覽次數(shù):2947
日期:2018-06 瀏覽次數(shù):2792
日期:2018-06 瀏覽次數(shù):2741
Copyright ? 2013-2018 Tadeng NetWork Technology Co., LTD. All Rights Reserved.