Hi StarLion. Sorry for my ignorance, but here I am loosing you. When I do as you said:
I get a Call to undefined function get_sub_categories() error So what would be my best option?
Edit:
I tried the following in the controller:
$categories = $this->page->get_categories();
foreach ($categories as $key=>$value)
{
$sub_categories = $this->page->get_sub_categories($value['category_id']);
}
and passed them both in the View! I don’t get any more errors but each category has the same submenu (the one belonging to the last category_id)