Help - Search - Members - Calendar
Full Version: Help displaying Categories with entries by date
Movable Type Community Forum > Additional Resources > Tips and Tricks
duchapl
I want to create a page which first lists all the categories on the site, then individual entries from that particular category... BUT, I only want to display the individual entries that have been posted within the last 30 days.

The idea is to show the "Current Issue" articles only.

Heres how it should look:

Category Name
Article name
Article name
Article name

Another Category Name
Article name
Article name
Article name

(where "Article Name" with post dates over 30 days are excluded from the display.)

I've tried lots of methods and searched the forum, nothing seems to work. Thanks in advance for any help.


P.S. Category, Date-based and Individual archives enabled
girlie
Question: assuming you get this to work, what happens when you start a new "Current Issue"? Won't the 30 days encompass articles from the old "Current Issue"?
duchapl
QUOTE (girlie @ Nov 28 2003, 06:16 PM)
Question: assuming you get this to work, what happens when you start a new "Current Issue"? Won't the 30 days encompass articles from the old "Current Issue"?

The concept (and yes, it's still a concept) is to upload all the current articles on a single day (or change the post dates and draft status using the power editing mode) so that I get dates that don't overlap. It's certainly not an exact science, I simply want the new issue to publish and old articles to move into archives.

The orgizational scheme I presented in the original post would give a nice "browse current issue by category" feature. Readers would still be able to see ALL articles by category and month (which isn't the problem.)

Perhaps it would be better to display category entries with dates within a certain month (everything in November, for instance) but I'm clueless here.

If I'm approaching this wrong, I'd appreciate some input on the concept and how it might be better handled.
girlie
The closest I can get off the top of my head would be something like this:

CODE
<MTArchiveList archive_type="Monthly" lastn="1">
<MTEntries category="cat1">
<MTEntriesHeader>
<MTEntryCategory><br />
</MTEntriesHeader>
<MTEntryTitle> <MTEntryDate><br />
</MTEntries><br />
</MTArchiveList>


which you'd have to repeat for each category you want to display, changing cat1 for each grouping.

You could create a new category for each issue and assign it to the entries, and use only one MTArchiveList grouping just for that category, but then you won't have the separation by the subcategories.

If you have Daily Archives or use the ArchiveAnyway plugin, you also might be able to replace <MTArchiveList archive_type="Monthly" lastn="1"> with <MTArchiveList archive_type="Daily" lastn="30">.
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.