Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Harald Weingaertner
Regular
Posts: 474 Joined: Mon Mar 27, 2006 12:32 am
Post
by Harald Weingaertner » Wed Sep 27, 2006 8:30 pm
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 » Wed Sep 27, 2006 10:41 pm
Ciao, Stephan
Harald Weingaertner
Regular
Posts: 474 Joined: Mon Mar 27, 2006 12:32 am
Post
by Harald Weingaertner » Thu Sep 28, 2006 2:02 pm
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 » Thu Sep 28, 2006 2:35 pm
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