Hi Thorsten,
any possibility to get the category parent name easily?
At the moment I'm just getting the immediate (sub)category name of an article by:
$currentCategory = PMF_Filter::filterInput(INPUT_GET, 'cat', FILTER_VALIDATE_INT);
$mytitle = $category->categoryName[$currentCategory]['name'];
Thanks!
Category parent name
Moderator: Thorsten
Re: Category parent name
Hi,
you can get the parent ID by using
bye
Thorsten
you can get the parent ID by using
Code: Select all
$parentId = $category->categoryName[$currentCategory]['parent_id'];
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Re: Category parent name
Thanks, Thorsten.
But will I have an opportunity to get the real name of the category? Not just the ID.
But will I have an opportunity to get the real name of the category? Not just the ID.
Re: Category parent name
Hi,
sure:
bye
Thorsten
sure:
Code: Select all
$parentId = $category->categoryName[$currentCategory]['parent_id'];
$categoryData = $category->getCategoryData($parentId);
$categoryName = $categoryData->getName();
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist