spiffy-navigation
spiffy-navigation copied to clipboard
paramsAreEquals() in Service\Navigation notice
The $routeParams indexes__CONTROLLER__ and NAMESPACE are not available when adding pages to a container, this generates a notice and makes menu item inactive while it should be active.
I'm facing this issue too when trying to add a menu item with route params. Am I misusing the params key?
config:
array(
'options' => array(
'route' => 'cf_reports',
'params' => array(
'action' => 'new',
),
'label' => 'New project',
),
'attributes' => array(
'name' => 'New project',
)
),
FWIW - to get this to work properly, I had to:
- Add a
'__NAMESPACE__'
to my route's'defaults'
rather than a fully qualified'controller'
. - Truncate the namespace from my
'default'
'controller'
. - Add the
'controller'
key to my menu item's'param'
key without the namespace.
Might help someone in future...