Are there any simple options other than plugins to enable pagination on the front page or any other page for that matter?
Reported on Movable Type 4.2
Are there any simple options other than plugins to enable pagination on the front page or any other page for that matter?
Reported on Movable Type 4.2
Not sure if this is what you're looking for, but if your front page has 30 entries, this will send readers to the 31st if, in your monthly archives, the title has an id of its entry ID:
It isn't true pagination, but it basically turns your monthly archives into extensions of your front page.
Very interesting.. this is my existing main index template, so how would I incorporate the above? (sorry i'm new)
argh... code is here: http://pastebin.com/m2d1bdf02
Mike:
The code on that page is less important than your archive structure. The code I posted assumes a monthly archive structure with a URL of www.sample.com/2009/05/ for the May 2009 archive. Are you publishing monthly archives? What does the URL for one of them look like? If it's different from what I've described, this won't work properly. But if you tell me what structure looks like, we can adapt it.
Beyond that, there needs to be an id associated with each entry on your monthly archive. If you're using an entry summary on your monthly archive page, you could add an id to div or h2 element (or just about anything else at the top of the summary) by adding this to it:
id="entry-"
E.g.:
Trying again ...
--
Mike:
The code on that page is less important than your archive structure. The code I posted assumes a monthly archive structure with a URL of www.sample.com/2009/05/ for the May 2009 archive. Are you publishing monthly archives? What does the URL for one of them look like? If it's different from what I've described, this won't work properly. But if you tell me what structure looks like, we can adapt it.
Beyond that, there needs to be an id associated with each entry on your monthly archive. If you're using an entry summary on your monthly archive page, you could add an id to div or h2 element (or just about anything else at the top of the summary) by adding this to it:
E.g.:
I have some blogs that are far too busy to show an entire month's posts, so I've enabled weekly archives, and created an "Entries Footer" template module (anything in it displays after the last entry) that contains only this:
<MTEntriesFooter>
<MTEntryPrevious>
<a href="<$MTEntryLink archive_type="Weekly"$>">Keep going: Page back through previous weeks' entries</a>
</MTEntryPrevious>
</MTEntriesFooter>
It goes into Main Index like this:
<MTEntries>
<$MTInclude module="Entry Summary"$>
<$MTInclude module="Entries Footer"$>
</MTEntries>
You do get some repetition of posts in the current week, but I can live with that; you could perhaps combine them, use the next entry's id like an anchor to land on the sequentially next entry, as Culture Snob does.
I'd like to attempt to use Culture snobs' idea but I can't seem to get it to work correctly.
You might check out A Quick Pagination Hack for Movable Type. Or, if you're a bit more programming-savvy, take a look at the Motion template set and how it uses the mtShowPage AJAX method along with a custom search handler to do pagination.
I don't think I've been clear on my method. I'm going to try again.
If you want "pagination" on the front page -- that is, you want a link at the bottom of the front page sending readers to a list of older entries that begins with the next entry in your archive -- you can do it very simply if (1) your front page is limited to a certain number of entries (rather than a certain number of days) and (2) you are publishing weekly/monthly/yearly archives.
The code will vary, but if you meet both those requirements, it's easy to implement; you only need to drop a line of code in the main index and one in either the entries loop of your date-based archive or the entry summary (if that's what your date-based archive calls).
This is the code for the main index from my blog:
It would need to be customized for the URL format of your date-based archive, and it assumes that your front page shows 30 entries.
What it requires on your date-based archive is an id element for each entry that matches the format from the main-page link. In the case of my code, that's entry-<$mt:entryid$>.
So at the bottom of my main page is a link to this:
http://www.culturesnob.net/2009/01/#entry-1449
And that links to January 2009 archive and finds the entry with an id of "entry-1449".
I'm sure I'm making it sound more complicated than it actually is, but my point (unclear in my first [and probably second]) reply is that the code I posted won't work unless some other things are done.
thanks everybody, i have learned something ,too.
-------------------------------------------------
welcome to shopping747.com,you may have something you need