Wednesday 19 March 2008 5:29:17 am
Yes - we have a current installation which uses an external ad server similar to OpenAds (but a hosted system) and we control the placement of the ads through a new class called Ad Tag. The class includes only a memo and the tag code, and then our templates look for that object and assign the tag in the JS for the ad zones. We treat it as a cascade, so it picks up the ad tag and applies to to the object and all of its subitems in the tree. If they add another ad tag in a subsection, it overrides the default one placed under the home page. The zones are fixed (leaderboard, skyscraper, etc) but the content of those zones is specified by the tags specified by the client. This is the code we use in pagelayout:
{def $start_node = first_set($DesignKeys:used.node, 2)}
{let checkarray=fetch( 'content', 'node', hash( 'node_id', $start_node )).path_array|reverse
ad_tag_nodes=array()
}
{foreach $checkarray as $thisnodeinpathid}
{set ad_tag_nodes = fetch('content', 'list', hash('parent_node_id', $thisnodeinpathid, class_filter_type, 'include', class_filter_array, array('ad_tag')))}
{if $ad_tag_nodes|count}
{break}
{/if}
{/foreach}
{if $ad_tag_nodes|count}
<!-- BEGIN RICH-MEDIA ADCONDUCTOR CODE -->
<script language="JavaScript">
rnum=Math.round(Math.random() * 100000);
document.write('<SCR'+'IPT SRC="http://ads.addesktop.com/cgi-bin/ads/ad{$ad_tag_nodes[0].name|trim|wash}.cgi/RS={$ad_tag_nodes[0].data_map.size_string.content|trim|wash}/KW={cond($ad_tag_nodes[0].data_map.keywords.has_content,$ad_tag_nodes[0].data_map.keywords.content.keyword_string|wash,'KEYWORD')}/V=3.0R/'+rnum+'/CNW/RETURN-CODE/"></SCR'+'IPT>');
</script>
<!-- END ADCONDUCTOR CODE -->
{/if}
{/let}
http://www.thinkcreative.com
Turning Ideas Into Strategic Solutions
|