Help - Search - Members - Calendar
Full Version: Nth Entry In Each Category
Movable Type Community Forum > Using Movable Type > Categories and Entry Tags
khar
Hey all,
I just want to display the number of this Entry in its Category. As I have only one level Category (so there would be no sub-category). Say I want to display:
e.g. the entry "title" is "5th" entry in "10" entries in category "A".
I'm using Movable Type 3.35.


thanks,

p.s. if there is topic which already talked about this problem, that would be great if you refer me to.
Su-
This should be easy to set up using the loop meta-variables.
OtherNiceMan
I thought loops came in MT4.x?
Su-
ARGH

Erm. I think you might be able to work this up by using Set/Get Var and the Arithmetic plugin, eg:
CODE
<$MTSetVar name="count" value="1"$>
<MTEntries>
<p><$MTEntryTitle$> is the <$MTGetVar name="count"$> entry in this loop</p>
<$MTAddVar name="count" value="1"$>
</MTEntries>

This may not be quite right, but the concept should be developed enough for you to fix. Gotta run.
khar
thank you all. the idea of using Get/Set Var is so neat. But doest this solution work about specific entry?! As I understood, that gives me a list of entries with its count number( say within the category, which is totally fine). but I need to have this in Individual Entry Archive. I think I might use that Solution somewhere in category archive then use it in Individual Entry Archive by playing with php stuff. But any help as to find out a trick to grab the number of entry in that count list?! mean X out of total number of entries within the category?!
or maybe needed to query the database directly?!

cheers,
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.