Re: One ad in one spot.
Posted by
Pedro on
Mar 22, 2013; 3:45am
URL: https://support.nabble.com/One-ad-in-one-spot-tp7583668p7583673.html
You should edit your show_custom_ads macro like this:
<override_macro name ="show_custom_ads" parameters="location" requires="servlet" >
<n.if.equal value1="[n.location/]" value2="widget">
<then>
<div class="ad">
<n.if.equal value1="[n.page_node.id/]" value2="5001365">
<then>
<div style="text-align: center;">
<a href="http://www.worthskis.com/" rel="nofollow" target="_blank">
<img src="http://nyskiblog.com/wp-content/uploads/2012/05/Worth-Skis.jpg" alt="Worth Skis" height="200" width="200" />
</a>
</div>
</then>
<else>
<script type="text/javascript">
google_ad_client = "ca-pub-0156740191883467";
/* Small-Square */
google_ad_slot = "1736553008";
google_ad_width = 200;
google_ad_height = 200;
google_page_url="<n.current_url/>"
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</else>
</n.if.equal>
</div>
</then>
<else>
<div class="ad shaded-bg-color rounded" style="padding:.5em 0">
<script type="text/javascript">
google_ad_client = "ca-pub-0156740191883467";
/* Leaderboard */
google_ad_slot = "9529659947";
google_ad_width = 728;
google_ad_height = 90;
google_page_url="<n.current_url/>"
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
</else>
</n.if.equal>
</override_macro>
The code is testing when the app is at that place you want to show the specific ad.