Page 1 of 1

Changing display order in all pages

Posted: Fri Dec 30, 2005 7:22 pm
by Tim Posey
:oops: Forgive me but I posted in the wrong forum on the previous message, but they were kind enough to help me with the following answer.

My original question was how to change the display order on the initial page of the blog so that the oldest appears first and they gave me the following answer which worked great, however when I go to the callendar and change months the entries on the resulting pages are still in the old order of last date posted.

Can anyone tell me where I need to edit to change this display.

Here's the code they gave me earlier. and thanks.

Yes, you can edit your include/genpage.inc.php file.

Replace:

Code:

// Welcome screen or whatever
default:
serendipity_printEntries(serendipity_fetchEntries(null, true, $serendipity['fetchLimit']));
break;


with

Code:

// Welcome screen or whatever
default:
serendipity_printEntries(serendipity_fetchEntries(null, true, $serendipity['fetchLimit'], false, false, 'timestamp ASC'));
break;


You could also outsource the include/genpage.inc.php as your template's config.inc.php or layout.php file. But since this is advanced stuff and harder to achieve, you'll maybe not want to do this.

Thanks,

Tim

Re: Changing display order in all pages

Posted: Fri Dec 30, 2005 7:37 pm
by garvinhicking
:-)

Actually, changing this for category view isn't hard as well. Look inside your include/genpage.inc.php and search for other calls of serendipity_fetchEntries(). You just need to change those calls like you changed the one earlier, by appending the parameters until "timestamp desc" [the 6th. parameter; parameter 4 and 5 can be "null"].

Have a try, it's not that hard. If you don'T succeed, just report back here with what you tried, and we'll solve it from there on :)

Best regards,
Garvin