Help - Search - Members - Calendar
Full Version: customize main menu?
Movable Type Community Forum > Additional Resources > Tips and Tricks
ghostgirl
what i want to do:

have somewhere in the main menu of my blog or in the new entry page a count of how many entries are in a specific category of the blog.  based on how i'm using my blog, this would actually be incredibly useful info for me but i can't figure out how to do it.

i see the tmpl (menu.tmpl) file that i would modify... what i can't figure out is how to get that specific information to display.  is there a way to do this, or is that info just way too specific?

the first route i tried was just including MT template tags in the welcome message field, but apparently MT won't parse those. that would have been slick, though.

i guess a broader related question is, is there some list somewhere of the useable TMPL_VAR variables & functions one could use in customizing these pages? that would be really handy.

any help would be greatly appreciated smile.gif
girlie
It appears from edit_categories.tmpl that the variable that lists the number of entries in a particular category is

TMPL_VAR NAME=CATEGORY_ENTRYCOUNT
ghostgirl
thanks for the quick answer!  well, that would seem be the way to do it.  unfortunately, that variable doesn't seem to do anything in the places i've tried to use it (on the menu page, then on the edit entries page).

here's the code i've used on the menu page, for example...

CODE
<p>
<u>Categories:</u><BR><BR>
<TMPL_LOOP NAME="CATEGORY_LOOP">
    ›› <TMPL_VAR NAME=CATEGORY_LABEL> - <TMPL_VAR NAME=CATEGORY_ENTRYCOUNT> entries <BR>
</TMPL_LOOP>
</p>


i thought that maybe the category loop wasn't enabled for the menu page or something, so i tried the category_count variable in the edit entries page where it lists all the categories in the drop-down.  didn't work there either.

ah well, i suppose i can just go to the Categories page every time i need to know how many entries there are.  the things we do for convenience!   tongue.gif
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.