default userpic

Display an entry's categories within hierarchy

Vote 0 Votes

I'm trying to get all of an entry's categories to display with the hierarchy intact... basically, a combination of mt:Subcategories and mt:EntryCategories. (why there is no mt:EntrySubcategories is still beyond me.) In order to simulate this behavior, I have to go to great lengths apparently. Here's what I've got.










Basically... go through the EntryCategories list and if it's a parent category, set it to $current and print it ... followed up by going through the EntryCategories list again and only printing the labels of categories that have $current as their parent.

This code actually works like it should. But when I tried to follow up the with a comma (since it's a list of subcategories), everything stops working and I just get empty s, which really is making no sense to me. This made me try completely static content inside the s, but that also returned empty s.

For some reason, it only works correctly if I print CategoryLabel and nothing else... not even a space. I tried a couple other category related tags and "CategoryBasename" also works... but not CategoryArchiveLink, CategoryCount, etc.

What's going on here? More importantly, how do I get what I want, even if it means abandoning this particularly bizarre track?

Any help appreciated.

Add a Reply

Forum Groups

6 7

Last Topic: API password missing. by Absoblogginlutely! on Feb 26, 2008

62 142

Last Topic: Issues obtaining the Source by apidevlab on Jul 17, 2008

69 125

Last Topic: L10N by Voulf on Jul 16, 2008

24 55

Last Topic: installing allong side a vbulletin by Forgoten Dynasty on Jul 20, 2008

3 5

Last Topic: Share your success story, please. by Gianluca on Jun 20, 2008

code.sixapart.com

20 46

Last Topic: Installing in sub-folder by Lala on Jul 5, 2008