主题 : 如何取广告位图片 |
级别: 举人
![]() |
1# 发表于:2019-11-14 11:38:57 IP:1.71.*.*
|
||||
---|---|---|---|---|---|
级别: 举人
![]() |
5# 发表于:2019-11-14 17:11:18 IP:1.71.*.*
美工手册里的例子太简单了,连广告是否启用的判定都没有,更没有到期时间的判定。
[@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] 这些只是判定广告类型并显示,没有是否启用、是否过期的判断。 现在想知道是否过期的判断要怎么写。 tag_bean.endTime是一个date类型,要怎么比较。 |
||
---|---|---|---|
1
共1页