Friday 21 October 2005 5:36:14 am
I have read on the forums about some who have integrated phpadsnew with eZ publish. If you just wanted to rotate ads at random and did not need to track or prioritize, you could simply use the shuffle operator (contributions) to randomly select one of the ads in a folder in the media section. Code like:
{set-block scope=root variable=cache_ttl}0{/set-block}
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><td>
{* Grab some of the banners and randomize the order. *}
{let children=fetch(content,
list,
hash( parent_node_id, 380, sort_by,array(priority,true())))|shuffle}
{* LOOP: For each banner... *}
{section name=Child loop=$children max=3}{* Display a max of 3 banners using attribute_view_gui. *}
<div>
<a href="{$Child:item.data_map.url.content}">
{attribute_view_gui attribute=$Child:item.data_map.image}
</a>
</div>
{* End of loop. *}{/section}{* End of namespace. *}{/let}</td>
</tr></table>
http://www.thinkcreative.com
Turning Ideas Into Strategic Solutions
|