Page 1 of 1

Adsense only after the first entry?

Posted: Wed Sep 27, 2006 8:30 pm
by Harald Weingaertner
Hello,

how can i show a Google Adsense Banner only after the first entry on the indexpage?

I need help ;)

Thanks, Harald

Posted: Wed Sep 27, 2006 10:41 pm
by stm999999999

Posted: Thu Sep 28, 2006 2:02 pm
by Harald Weingaertner
This does not solve my problem. I now know how it can be done theoretical.

Is someone able to solve this issue with an practical example? ;)

Posted: Thu Sep 28, 2006 2:35 pm
by stm999999999
hm

Code: Select all

<code> 

{foreach name="dategroup" from=$dategroup.entries item="entry"}

</code>

Now we need to ask if we're on the first entry of the group (the first loop). That's as simple as checking the "first" attribute of our foreach, like this: 
        {if $smarty.foreach.dategroup.first}

code for the banner      

        {/if}
???

Posted: Thu Sep 28, 2006 3:18 pm
by Harald Weingaertner
Ok, sorry! My fault... Thank you. I've got it now.