Dynamic Publishing Rocks »
I know. Movable Type isn't designed to be a completely dynamic publishing system. If you use dynamic publishing, you risk your site going down because it takes more resources or MySQL isn't running. While valid, I'm less concerned about that last point, as a part of the site that I enjoy is the commenting process. Without MySQL, comments won't happen either. Plus, I love what I can do with Smarty.
So I'm staking my hopes on my site, and more specifically, MySQL, continuing to run, and I'm making most of the site dynamic in nature. The biggest change recently was the introduction of comment pagination - this means if there are a billion comments on an entry, they don't all load at once, but instead you get a page at a time. I don't think I'm quite done with the comment process in general - notably I need to make some more sensible links and work on save times - but I like the way it's working now.
You hopefully didn't notice, except for the lack of comments for a brief time, but the individual entries are now being built dynamically as well as the other archives (Category and Date-Based). About the only thing left that is static is the home page, the archives page and the software page.
I also made some changes to the archives. Previously, pagination would use a "query string" at the end of a URL to bring up the second page of the archive. While that will still work, it wasn't what I wanted. So I tweaked mt.php, and now the pagination uses a number at the end of a URL. So instead of index.html?p=2, the links will use index.html/2. In either case, all you have to do is change the number at the end to another number to view another page.
Finally, I switched the order of the archives. Previously they were listed in descending order, like the home page. That means that each new entry moved all the other entries down one, and potentially onto another page (or even to an entirely new page). I realize that people like to bookmark things, and as such, it means what you bookmarked on the first page might not always be there. It also meant if you were browsing the archives, you were reading backwards. So I flipped the sort order, meaning all archives are in ascending order - you start at the beginning and read to the end. Any new entries will then be added to the end, and anytime you bookmark a page of archives, it will contain the same entries when you return.
Let me know what you think about the changes, and if there's anything else you'd like to see along the way.





















Comments (4)
How did you get your monthly archives reversed? Mine go from Dec-Jan, and I'd love it if they went from Jan-Dec. Lemme know!
Thanks,
Graham
Posted by Graham on September 16, 2005 9:20 PM
Hi Graham -
If you mean the monthly archive summary by year, that's just Smarty code that I wrote to work that way. My company offers Movable Type consulting if you're interested and/or can't make sense out of it yourself. Just drop us a line.
Posted by Chad Everett on September 16, 2005 10:19 PM
Hey Chad, have you posted some Smarty code that allows pagination on your individual entry pages with a lot of comments? I can't seem to find code for this. Thanks!
Posted by Shane on September 2, 2007 8:53 PM
Hi Shane -
I have not posted any specific code, no, but the process is the same. Instead of wrapping the <MTEntries> block, however, you wrap the <MTComments> block.
And instead of looking at the <MTEntryCount>, you look at the <MTCommentCount> (to build your pages based on number of comments, instead of number of entries).
But other than that, the process is about the same.
Posted by Chad Everett on September 3, 2007 7:45 AM