This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
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
I managed to get it working at last. The problem (for me) was that everything is capital-sensitive. No one ever mentioned that anywhere xD.
I had to change CptMeatball.PriceTables
to Cptmeatball.Pricetables
in setContext
Last updated
Cpt.Meatball said:
I managed to get it working at last. The problem (for me) was that everything is capital-sensitive. No one ever mentioned that anywhere xD.
I had to change
CptMeatball.PriceTables
toCptmeatball.Pricetables
in setContext
Thanks - it is really time spending with that "spaghetti" documentation
1-4 of 4