Hi Guys!
I'm struggling to get my backend sidemen working. I've looked at multiple forum posts and at the documentation but there's seems to be something I'm doing wrong.
I've registered my navigation as below:
public function registerNavigation()
{
return [
'pricetables' => [
'label' => "Pricetables",
'url' => Backend::url('cptmeatball/pricetables/price'),
'permissions' => ['cptmeatball.*'],
'icon' => 'icon-table',
'sideMenu' => [
'price' => [
'label' => 'price',
'icon' => 'icon-money',
'url' => Backend::url('cptmeatball/pricetables/price'),
'permissions' => ['cptmeatball.pricetables.access_prices']
],
'category' => [
'label' => 'category',
'icon' => 'icon-money',
'url' => Backend::url('cptmeatball/pricetables/category'),
'permissions' => ['cptmeatball.pricetables.access_categories']
],
'currency' => [
'label' => 'currency',
'icon' => 'icon-money',
'url' => Backend::url('cptmeatball/pricetables/currency'),
'permissions' => ['cptmeatball.pricetables.access_currency']
]
]
]
];
}
//Controller class (namespace and imports excluded)
class Price extends \Backend\Classes\Controller {
public function __construct()
{
parent::__construct();
BackendMenu::setContext('CptMeatball.PriceTables', 'pricetables', 'price');
}
public function index()
{
}
}
Same goes for the controller "Category" and "Currency". The third parameter for contexts is set as category and currency.
Do I need to something with the controller-view or am I just missing some code to init the menu?
PS: markdown isn't what I hoped it was. It like never works properly. So pardon the indentation.
Last updated