Adsense only after the first entry?

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
Harald Weingaertner
Regular
Posts: 474
Joined: Mon Mar 27, 2006 12:32 am

Adsense only after the first entry?

Post 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
stm999999999
Regular
Posts: 1531
Joined: Tue Mar 07, 2006 11:25 pm
Location: Berlin, Germany
Contact:

Post by stm999999999 »

Ciao, Stephan
Harald Weingaertner
Regular
Posts: 474
Joined: Mon Mar 27, 2006 12:32 am

Post 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? ;)
stm999999999
Regular
Posts: 1531
Joined: Tue Mar 07, 2006 11:25 pm
Location: Berlin, Germany
Contact:

Post 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}
???
Ciao, Stephan
Harald Weingaertner
Regular
Posts: 474
Joined: Mon Mar 27, 2006 12:32 am

Post by Harald Weingaertner »

Ok, sorry! My fault... Thank you. I've got it now.
Post Reply