I put this loop link counter on the page and the if link counter in the right sidebar to display ads depending on the amount of room available. I used- loop link counter (set to stop counting at 9)
<%loop links_loop%>
<%set Link_Counter += 1%>
<%if Link_Counter > 9%>
<%lastloop%>
if link counter
(more than 0) Display med button ad.
<%else%>
(0) Display small button ad.
<%endif%> This works very well. My question is what is the correct if syntex to use to show longer ads depending on how much room is available. This would be determined by the number of links being displayed in the category and search page. Such as (I know this is not correct)-
(more than 0) Display med button ad.
<%else%>
(0) Display small button ad.
<%unless%>
<%Link_Counter > 3%>
(more than 3) Display long ad.
<%unless%>
<%Link_Counter > 5%>
(more than 5) Display longer ad.
<%endif%>
Any ideas?
Code:
<%set Link_Counter = 0%> <%loop links_loop%>
<%set Link_Counter += 1%>
<%if Link_Counter > 9%>
<%lastloop%>
Code:
<%if Link_Counter > 0%> (more than 0) Display med button ad.
<%else%>
(0) Display small button ad.
<%endif%>
Code:
<%if Link_Counter > 0%> (more than 0) Display med button ad.
<%else%>
(0) Display small button ad.
<%unless%>
<%Link_Counter > 3%>
(more than 3) Display long ad.
<%unless%>
<%Link_Counter > 5%>
(more than 5) Display longer ad.
<%endif%>