entries displayed on front page

Creating and modifying plugins.
Post Reply
linda kovacevic
Regular
Posts: 7
Joined: Tue Feb 07, 2006 12:59 pm
Location: The Hague
Contact:

entries displayed on front page

Post by linda kovacevic »

I set the number of entries to 5 and it does that...however....all my other entries are on the following pages (each page 5 entries long).
How do I get just the 5 latest entries on my front page and the rest in the archieves?

Thanks!
Linda

ps I'm an serendipity dummie so please write accordingly :wink:
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: entries displayed on front page

Post by garvinhicking »

Actually, you cannot do that.

You can only set how many entries to display per page. It doesn't make sense to have one page with 5 entries and the next page containing all the entries, IMHO.

What you could do, though, is to write a simple template instruction that sets the number of entries on the frontpage to 5 and for the rest of the pages to "15". To do that, set the s9y configuration number of entries per page to "15".

Then create a file "config.inc.php" inside the directory of the template you are using with this content:

Code: Select all

<?php
if (!isset($serendipity['GET']['category']) || empty($serendipity['GET']['category'])) {
    $serendipity['fetchLimit'] = 5;
}
?>
I hope this does the trick for you.

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/
linda kovacevic
Regular
Posts: 7
Joined: Tue Feb 07, 2006 12:59 pm
Location: The Hague
Contact:

Re: entries displayed on front page

Post by linda kovacevic »

Thanks for the quick response!

The reason I asked is that when somebody finds my site via google that the stuff they are looking for is not at the top of the page but somewhere amongst the entries. If there were only a few entries visible and the rest only accessable via the archieves then the google search will show the entry from the archieves. That way it will be on top of the page instead of somewhere amongst the entries. Hope I'm being clear?!

Linda
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: entries displayed on front page

Post by garvinhicking »

Yes, but didn't you read my message completely? I indicated how you can solve it.

BTW, google should usually point to the individual entries, not to the frontpage or the archives page when you search for specific terms.

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/
linda kovacevic
Regular
Posts: 7
Joined: Tue Feb 07, 2006 12:59 pm
Location: The Hague
Contact:

Re: entries displayed on front page

Post by linda kovacevic »

Thanks again...gonna try and do it!
Post Reply