Hi all!
I would like to ask for a small code snippet, that I was not able to find anywhere.
Loading an item's main category name is OK, with using this snippet:
But this not loads the subcategory name/id.
Maybe someone knows how it's possible to load the item's subcategory ID or at least the name when listing the items in category.php
Thanks for your help in advance!
Best Regards,
PePe
I would like to ask for a small code snippet, that I was not able to find anywhere.
Loading an item's main category name is OK, with using this snippet:
<?php
$parent = JTable::getInstance('K2Category', 'Table');
$parent->load($item->category->parent);
?>But this not loads the subcategory name/id.
Maybe someone knows how it's possible to load the item's subcategory ID or at least the name when listing the items in category.php
Thanks for your help in advance!
Best Regards,
PePe