Help - Search - Members - Calendar
Full Version: reversing order of entries in archive
Movable Type Community Forum > Additional Resources > Tips and Tricks
Vel
interesting question.

i am quite happy with the main page (newest on top) but i want the category archives to list the things from oldest at top.

i am writing a "story" and want the category of "story" to read as a normal story - from the beginning to the end.

is this possible??
girlie
In your Category Archive Template:

CODE
<MTEntries sort_order="ascend">
zoo1023
For some reason, this will just plain NOT work in my category archives.

I'm starting to think I'm going crazy. The site's skinned, so here's the code:

CODE
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<$MTPublishCharset$>" />

<title><$MTBlogName$>: <$MTArchiveTitle$> Archives</title>

<$MTInclude module="header"$>

<MTEntries sort_order="ascend'' sort_by="title">

<div class="blogbody">
<$MTEntryBody$>
<div class="posted">
        <$MTEntryDate format="%X ~ %m/%d/%y"$>
    ~ <a href="<$MTEntryPermalink$>">Link</a>
    <MTEntryIfAllowComments>
    ~ <a href="<$MTCGIPath$><$MTCommentScript$>?entry_id=<$MTEntryID$>" onclick="OpenComments(this.href); return false">Comments (<$MTEntryCommentCount$>)</a>
    </MTEntryIfAllowComments>
    </div>

</div>

</MTEntries>
<$MTInclude module="footer"$>


It's not ascending. I can't figure out what I did wrong! Help! The page in question is: (deleted)

Everything's still really messy, so watch your step wink.gif
girlie
Look closely: you have two single quotes after ascend instead of one double-quote.
zoo1023
Girlie, I could kiss you. A million times.

Seriously, I was ready to cry, I couldn't figure out what the heck was going on.

I hope you know your help on these forums is appreciated, and probably makes at least one person's day every day.
girlie
Thank you! biggrin.gif
witchy
Hello,

I was wondering if someone would be kind enough to point out to me, what I'm doing wrong.

I'd like to do the same thing that zoo is doing. But when I put in the code that should have the category page by oldest first, when ever I rebuild, I'm getting an error.

Am I, perhaps not putting in the complete code? or perhaps, I should have put something else at the end?

(I even tried putting the code in different places)
CODE
</MTDateHeader>

<MTEntries sort_order="ascend" sort_by="title">
<div class="blogbody">

<a name="<$MTEntryID pad="1"$>"></a>


This is where I put it.

than I save and rebuild, I get this error:
CODE
An error occurred:
Building entry ' Chaotic Brew Tavern, The Story' failed: Parse error in template 'Category Archive': <MTEntries> with no </MTEntries>


and this is the end of my template...
CODE
    </MTEntryIfAllowPings>
</div>

</div>

</MTEntries>
</div>

</div>

</body>
</html>



now, I made sure that it was the double quote mark and not the single.

I've also tried changing the part, where it says "title" to
CODE
<MTEntries sort_order="ascend" sort_by="a chaotic brew tavern story">


(I especially wanted to be able to do this by "story", since I'll have a couple different stories at this site)

and, knowing nothing about MT code, I even tried this....

CODE
<MTEntries sort_order="ascend" sort_by="<MTEntries category="a chaotic brew tavern story">">


But with them all, I still get the same error message, about no closing MT Entry tag.


I can post the complete template, I just knew that I would be saying so much, I was trying to keep the space down some smile.gif

Any help, suggestion or hint, would be much appreciated.
witchy
well, I found the problem. *G* like I thought, it was me being a space cadet.

I had both MTEntries plus the MTEntries sort_order="ascend" sort_by="title

that's why it keep telling me that I didn't have a /mtentries ending.

Thanks any way, for any one who stopped by to help smile.gif
witchy
ok, never mind. it's still not doing what I though it would do.

It has 1 entry at the top, but eveything below that, is all mixed up.

any one will to give advice?
witchy
ok, *G* never mind again. I changed the part of the code that says 'title' to 'date' and it works perfect.

smile.gif again, thanks to any one that was willing to help smile.gif
witchy
Just in case any one else has this problem (and are like me, 'have not brain' smile.gif --

I had to change the 'date' to 'title' because I would post 2 chapters on the same day, and it would get them out of order on the archive page.

Then, I discovered, that even though chapter 1 was still first on the archive page, chapter 11 came right after it. So all I did, was go in to power editing mode, and changed all the chapters that had single digits, to 01, 02, 03, etc, and they are all back in order again. Hopefully, they'll stay this way now biggrin.gif
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-2010 Invision Power Services, Inc.