Help - Search - Members - Calendar
Full Version: Ordering of entries within the same day
Movable Type Community Forum > Additional Resources > Tips and Tricks
Apsylus
Hello,

I was wondering if anyone could help me out with this smile.gif

My blog is listed in descending order by date (newest entries first), however, I would like to make it so that entries within the same date are in ascending order (i.e. earlier entry first). Is this possible?

The reason why I would like to do this is because I was using Blogger before I migrated to MT. Blogger has the option of sorting the entries of the same date chronologically or reverse chronologically, no matter how the blogger is sorted otherwise. I imported my Blogger entries to MT, and I would love to be able to keep some sort of consistency. It is a minor matter, but if this is doable at all in MT, it would be terrific wink.gif

Any help would be greatly appreciated. Thank you smile.gif
stepan
Note that you can specify the order for each MTEntries listing (using the sort_order attribute). For example, on my blog, on the main index page I list my entries in descending order (newest first) and on my archive pages in ascending order (oldest first).

You can't do more complex sort (days ascending, entries descending, etc.) straight out of the box. Hoever, you can acomplish this using the MTCollate plugin and (possibly) using the MTSQL plugin.

And, of course, there are also solutions using PHP. Try searching the forum.
girlie
This can already be done "out of the box" just by turning on Daily Archives:

Combine Descending Days with Ascending Entries

If you don't really want to generate Daily Archive pages (for space reasons, personal preference, etc.), you can adapt the tip Crys gives in this topic on faking Monthly Archives to Daily Archives instead.
Apsylus
Thank you so much for the help~! smile.gif

I didn't want to install an additional plugin, so I tried girlie's method. It worked wink.gif

Having a bit of a problem with the archives though~ I'm using Monthly archives, and I have no idea how to make each month's archive page to display only the month's entries while keeping the format (ascending within day). For the index/main journal page, I have the lastn attribute to limit the number of entries -- which apparently I can't use for the Monthly archives page, since that would limit the entries to a fixed number, instead of all the entries of the month.

If this can be fixed as well, I would be elated, but otherwise, I'm happy enough wink.gif

Again, thank you, girlie and Stepan biggrin.gif
girlie
Just my opinion (if I understand that you're trying to duplicate the Main Index behavior on the Monthly Archives): When I read someone's main page, I want to see the most recent day at the top; if I'm reading a monthly page, I expect to see all entries in the order they were written (oldest to newest).

At any rate, off the top of my head I'm not sure if what you're wanting will work simply because Monthly Archives and Daily Archives are two different things.
Apsylus
True, which was why I said it wouldn't really matter smile.gif It's just that I wanted to keep my blog looking exactly like how it'd always been, but it's really just a minor thing.

At any rate, thanks a lot for the help, I really appreciate it! smile.gif
nefarious
WOOHOO.. thank you Girlie! I searched through the forums for about an hour until I found this solution.

I need it because I am doing multi-page reviews on my site and needed the sections to show up in the correct order.. ie:
Introduction
Packaging
Documentation
Construction
Setup
Performance
Summary

After spending hours and hours entering the reviews I have to say you are my hero for the day smile.gif

-nef
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.