New "sticky" concepts?

Discussion corner for Developers of Serendipity.
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Post by Don Chambers »

garvinhicking wrote:Hi!

What is not working? What do you get/see? What do you expect?

Regards,
Garvin
I get the page footer info: (Page 1 of 1, totaling 3 entries)
=Don=
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

If you use serendipity_fetchPrintEntries frmo within a s9y blog page where entries have already been displayed, the $footer* variables will still be set frmo the usual s9y display logic. So you'll might need to clear those variable.

The 'use_footer' logic is usually only useful if the {serendipity_FetchPrintEntries} is coming from something like within a staticpage or a foreign application, not from a entries.tpl template file itself.

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/
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Post by Don Chambers »

garvinhicking wrote:Hi!

If you use serendipity_fetchPrintEntries frmo within a s9y blog page where entries have already been displayed, the $footer* variables will still be set frmo the usual s9y display logic. So you'll might need to clear those variable.

The 'use_footer' logic is usually only useful if the {serendipity_FetchPrintEntries} is coming from something like within a staticpage or a foreign application, not from a entries.tpl template file itself.

Regards,
Garvin
Thanks Garvin - no entries have been previously been displayed. I could definine a unique entries.tpl file for this purpose, but I was trying to avoid having "yet another file". How can I try to clear the variable?
=Don=
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Where do you place this {serendipity_fetchEntries} call? If you do that from entries.tpl, you actually will have $footer* variables set and it's hard to clear those without creating a custom PHP plugin.

Instead, I'd suggest to use your own entries2.tpl template file for the fetchPrintEntries call, and leave out the footer info stuff in that file.

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/
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Post by Don Chambers »

Garvin - it is called from index.tpl, not entries.tpl. I have a frontpage that contains more than just entries, so when on the frontpage, and only the front page, I have this:

Code: Select all

{if $currpage==$serendipityBaseURL}
        {serendipity_fetchPrintEntries limit="0,5" full="true" use_footer="false" skip_smarty_hooks="true" template="entries.tpl"}
Again, there is more than that after the call to entries.tpl, but this is the relevant portion.
=Don=
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

What else is called on the page? As soon as a entries.tpl is parsed anywhere (even if it occurs after the fetchPrintentries), the footer* vars will be set...

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/
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Post by Don Chambers »

After my startpage {if} I have an {elseif} that fetches a different set of entries - specific to a category (also with use_footer="false"), then {else} is {$CONTENT}.... so wouldn't that mean it has not been parsed anywhere for the startpage???
=Don=
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Can you put a ZIP online with that template?

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/
Post Reply