Help - Search - Members - Calendar
Full Version: Single Category Count On Entire Site
Movable Type Community Forum > Using Movable Type > Categories and Entry Tags
johneklund
I'm trying to setup a single category count that shows on every page of the site, even when you're not in that category.

Here's the setup: I have 3 top categories: News, Stuff and Ratings. Inside the Ratings category I've got 10 subcats (0 through 10).

On each page of the site I want to be able to tell the user how many total Ratings we have. I don't want to include the subcats in the number.

I've played with a lot of variations and can't quite get it to show correctly - it will show me the number, but also put the counts for each of the other categories and subcategories in there so instead of 4 I get 11114. Any ideas how to narrow it down to just that top category and give me that count on every page?

Thanks,

-John
johneklund
Solved - in a module template (I used the footer template), you just slap in the following code (works for both categories and subcategories):

CODE
<MTCategories>
<mt:IfCategory label="Ratings">
<mt:CategoryCount />
</mt:IfCategory>
</MTCategories>
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.