I'm trying to get the category id's of a site listing multiple featured articles. JFactory::getApplication()->input->getInt('catid'); works fine if the site contains just an article.

Is there something similar for featured articles?

Thanks in advance!

1 Answer 1


You will not get it from the input, because the categories are not set into the request for featured view.

What you can do is to use the parameters of active menu item to retrieve them. Like this:

$activeMenu = JFactory::getApplication()->getMenu()->getActive();
$categories = $activeMenu->params->get('featured_categories');

The result is an array with categories ids:

    [0]=> string(2) "19" 
    [1]=> string(2) "20" 
  • Sorry for the late reply. This works perfect!
    – Rikan
    Jan 30, 2015 at 9:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.