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