Help - Search - Members - Calendar
Full Version: Category Entry Count w/ Odd Seperation
Movable Type Community Forum > Additional Resources > Tips and Tricks
kgish
According to me you should use the following:

CODE
<MTArchiveList archive_type="Category">
<a href="<$MTArchiveLink$>"><$MTArchiveTitle$></a> [<$MTArchiveCount$>]<br />
</MTArchiveList>


Hope this is the right answer...
jmevius
I have a photolog that is structured by categories.  I use a subcategory (Thumbnails) to pull one photo from each grouping to appear on an index page.

The code that generates my index template is:

CODE
<MTEntries category="Thumbnails">
<div class="gallery">
<div class="thumbnail">
<a href="<$MTEntryLink Archive_type="Category"$>">
<img src="<$MTEntryLink Archive_type="Category"$>/../<$MTEntryTitle$>s.jpg">
</a>
</div>
<div class="phototitle">
<a href="<$MTEntryLink Archive_type="Category"$>">
<$MTEntryMore$>
</a>
</div>
<div class="photodescription">
<$MTEntryExcerpt$>
</div>
</div>
<br clear="all" />
</MTEntries>


I'm trying to include a entry count for each category on this page, so the title block might say "San Francisco 2001 [34]", where 34 represents the number of piuctures in the category San Francisco.

I tried replacing the <$MTEntryMore$> tag with <$MTEntryMore$> [<$MTBlogEntryCount$>] and I get "San Francisco 2001 [284]" (the total count for all the photos in all categories.

I tried replacing the <$MTEntryMore$> tag with <$MTEntryMore$> [<$MTArchiveCount$>] and I get "San Francisco 2001 [0]".

I tried replacing the <$MTEntryMore$> tag with <$MTEntryMore$> [<$MTCategoryCount$>] and I get "San Francisco 2001 [34151567101230496611210]" (each category seperated).

Any ideas?  This is (or in my mind, should be) such a trivial matter, but it's really throwing me.

Jason
jmevius
Maybe I'm incorrect in thinking about the implementation, but doesn't this break the category structure?  Maybe I didn't fully explain the setup I have.

For a standard entry in my photolog, I enter the photo_id (ex. DSCN1008) for my EntryTitle and a brief description of the photo for my EntryBody.

In each category, I choose one picture that I think is a good representation of the set (grouped by category) and give it a subcategory (Thumbnails).  The sub-entry has an additional title in the MTEntryMore field and an additional description (this was started before the <$MTCategoryDescription$> tag) in the MTEntryExcerpt field.

The index template I posted before gives the output found at:

http://the.jasonmevius.com/content/photolog/index.php

When I tried to create an archive template like you suggested, I got an output that wasn't quite what I was looking for.  It returned this:

CODE
23rd Birthday Party [15]
Cows [15]
Dallas Aquarium [67]
Halloween 2001 [10]
Jessica 23rd Birthday [12]
Koi Fish [30]
Miscellaneous [49]
NYC [66]
SF Wedding [14]
Telluride [6]
Thumbnails [10]

How could I use the code you suggested and still capture the information from one particular entry?  Could they be ordered so the most recently entered category is at the top?  Can I exclude the category Thumbnails from the listing?

Thanks for your help.

Jason
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.