Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Nesting Categories within Parent Categories
I'm trying to set up a categories page that has categories nested inside their respective parent categories. In order to do this, I need to style the parent divs differently. I'm unsure, however, how to target just a parent category in the php.
My div right now looks like this:
That shows all categories. when echoing $Category->Name, is there a way to just echo a parent category? Something like $Category->Parent->Name? I'm not completely familiar with the Vanilla coding system yet. I was looking for a tag list or something, but I didn't see that. At this point, though, all I need is a way to single out a parent category, or a child category so that I can echo them out with separate div classes for styling. Can anyone help me out?
My div right now looks like this:
<div class="Tabs CategoryTabs">
<h2 class="DTPCategoryName"><?php echo Anchor($Category->Name, '/categories/'.$Category->UrlCode); ?></h2>
<p class="DTPCategoryDesc"><?php echo Anchor($Category->Description); ?></p>
</div>
That shows all categories. when echoing $Category->Name, is there a way to just echo a parent category? Something like $Category->Parent->Name? I'm not completely familiar with the Vanilla coding system yet. I was looking for a tag list or something, but I didn't see that. At this point, though, all I need is a way to single out a parent category, or a child category so that I can echo them out with separate div classes for styling. Can anyone help me out?
0