Can I change number of posts

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
Bogomil_shopov

Can I change number of posts

Post by Bogomil_shopov »

Can I change number of posts shown to homepage. For exapmple I want to view only 1 post on index page.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Can I change number of posts

Post by garvinhicking »

Sure. Edit your templates/.../layout.php and search for the function serendipity_printEntries(). The number '15' is an argument there, change it to whatever you like to display 10 instead of 15 entries.

For our next version (0.8), we will add a configuration directive for this.

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/
Bogomil_shopov

re

Post by Bogomil_shopov »

Thank you.

Bogomil
Bogomil_shopov

re

Post by Bogomil_shopov »

Waht about if I haven't layout.php in my template folder
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: re

Post by garvinhicking »

Then you just take the templates/default/layout.php :-)
# 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/
Bogomil_shopov

re

Post by Bogomil_shopov »

Thanks. Is there any possibility to use 2 languages instead of onlu one?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: re

Post by garvinhicking »

What do you mean with that? Do you want to have everything displayed in 2 languages? That would seriously affect your layout and look bad.

You can offer a language switcher, if you take the code from the template switcher/Chooser and let user decide which language they want to see. But that only affects strings from Serendipity, the articles you write will only be shown in the language you've written it, of course. :)

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/
Bogomil_shopov

re

Post by Bogomil_shopov »

Thanks. Yes I am talking about language switcher for serendipity kyes. Thans again

Bogomil
Post Reply