sticky posts

Discussion corner for Developers of Serendipity.
Post Reply
haga
Regular
Posts: 25
Joined: Mon Jan 29, 2007 3:29 pm

sticky posts

Post by haga »

HI!
I want to publish sticky posts on a different place on the website, not on top of all other entries.

i need somthing similar to:

show only 1 sticky post
{serendipity_fetchPrintEntries category=2 limit="0,1" use_hooks=0 template="entriesStart.tpl"} -> only 1 sticky post

---- other plugins ----

{serendipity_fetchPrintEntries category=2 limit="1,5" noSticky="true" use_hooks=0 template="entriesStart.tpl"} -> rest of entries


is there a solution?
thanks in advance!
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: sticky posts

Post by garvinhicking »

Hi!

You would need to edit yoru default entries.tpl template file and check inside the foreach loop that no sticky entries are shown. Then you can use a different entries.tpl file (to use with {serendipity_fetchPrintEntries} that DOES show those sticky entries.

Hope I understood you properly.

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/
haga
Regular
Posts: 25
Joined: Mon Jan 29, 2007 3:29 pm

Re: sticky posts

Post by haga »

well, i think, i can solve this with different categories. this would be the easiest was - or is there a way to show only sticky entries?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: sticky posts

Post by garvinhicking »

Hi!
haga wrote:well, i think, i can solve this with different categories. this would be the easiest was - or is there a way to show only sticky entries?
Yes, by editing the template you use to display the entry and only showing entries {if $dategroup.is_sticky}....{else}//Nothing!{/if}

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:

Re: sticky posts

Post by Don Chambers »

I personally think you should use a specific category for what you want.
=Don=
haga
Regular
Posts: 25
Joined: Mon Jan 29, 2007 3:29 pm

Re: sticky posts

Post by haga »

thanks for your help!
categories are a great thing :-)
Post Reply