tips and tricks for movable type
first entry in blog or category
February 15, 2003
Requires Brad Choate's MySQL plugin. He gets credit for the Category code via Brenna, who I believe first posted the Blog code in the forum.
First Entry in a Blog:
<MTEntryDate>
<MTEntryTitle><br />
</MTSQLEntries>
First Entry in Each Category:
<$MTCategoryLabel$><br />
<MTSQLEntries query="select entry_id from mt_entry, mt_placement where placement_blog_id=[MTBlogID] and placement_category_id=[MTCategoryID] and entry_status=2 and entry_id=placement_entry_id order by entry_created_on asc limit 1">
<$MTEntryBody$>
</MTSQLEntries>
</MTCategories>
From this MT support forum thread.
TrackBack: 1
(URL: http://www.thegirliematters.com/sf/mt-track.cgi/139)
» Showing first entry in each category
Excerpt: As part of a new webpage based on MT, I needed to have the first entry in every category to be displayed, but no built in code in MT could do it. So I posted something on the MovableType forum...
Weblog: Nangka.org | Events
Tracked: 12.07.04 08:19 AM
Comments
the codes work great! thanks.
i was wondering how you would display the first entry of a category. i'm trying to create an index file that shoes only the first entries of all the categories.
within a container tag, that is.
Great site!
The help I get here and on scriptygoddess is awesome!
My other site:
CrimsonLight