How can I include article data from database of a subcategory? I have successfully got the subcategory using JCategories
API helper, however I have not yet found a way to get the article in the subcategory below is my module helper file:
defined('_JEXEC') or die;
jimport('joomla.application.categories');
class Modtopviewcourses extends JCategories
{
public static function getdata($catid)
{
$categories = JCategories::getInstance('Content');
$cat = $categories->get($catid);
$children = $cat->getChildren();
$res=array();
$res['articles']=$children;
return $res;
}
}