I think this is pretty simple (but not for me )
I need to add a custom code just after the first entry in the blog homepage (not the first entry of every page).
Like this
POST1
[custom code]
----------------------
POST2
----------------------
POST3
----------------------
---page2----
POST1
[NOT CUSTOM CODE]
----------------------
POST2
----------------------
POST3
Regards, Francesco.
Add code only after first entry (how?)
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Add code only after first entry (how?)
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Re: Add code only after first entry (how?)
Thank you, this works with a little correction.
Do you think is correct?
NOT WORKING
WORKING
Do you think is correct?
NOT WORKING
Code: Select all
{foreach from=$entries item="dategroup" name="outerloop"}
{foreach from=$dategroup.entries item="entry" name="innerloop"}
{if $startpage && $smarty.innerloop.first && $smarty.outerloop.first}
<div class="first">
{else}
<div>
{/if}
....
{/foreach}
{/foreach}
Code: Select all
{foreach from=$entries item="dategroup" name="outerloop"}
{foreach from=$dategroup.entries item="entry" name="innerloop"}
{if $startpage && $smarty.foreach.innerloop.first && $smarty.foreach.outerloop.first}
<div class="first">
{else}
<div>
{/if}
....
{/foreach}
{/foreach}
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Add code only after first entry (how?)
Hi!
Good catch! Yes, that would be the proper notation!
Regards,
Garvin
Good catch! Yes, that would be the proper notation!
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
-
- Regular
- Posts: 3652
- Joined: Mon Feb 13, 2006 2:40 am
- Location: Chicago, IL, USA
- Contact: