Two dedicated ads in one spot on my app.
Posted by
Harvey on
May 13, 2013; 12:31am
URL: https://support.nabble.com/Two-dedicated-ads-in-one-spot-on-my-app-tp7584388.html
I currently have one ad that only runs in one spot here:
http://directory.nyskiblog.com/Vermont-Ski-Areas-f5001365.htmlI'd like to add another (different) ad that one runs on this page. Somehow I now have 4 ads - but I only want two. For some reason I am getting duplicates.
Can you help me write this macro so that it shows two different ads on the page above only?
Here is the code I have. I thought this would show two ads not four:
<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; padding-top: 20px;">
<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>
<div style="text-align: center; padding-top: 20px;">
<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>
<n.as_html_comments.location/>
<n.if.not.regex_matches text="[n.location/]" pattern="app_bottom|topic_bottom|search_top">
<then>
<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>
</then>
</n.if.not.regex_matches>
</else>
</n.if.equal>
</override_macro>
HTTPS Please!