Note that there are some explanatory texts on larger screens.

plurals
  1. POZend Framework 2: active menu items
    primarykey
    data
    text
    <p>Build navigation from config:</p> <pre><code>'navigation' =&gt; array( 'default' =&gt; array( 'admin' =&gt; array( 'label' =&gt; 'Administration', 'controller' =&gt; 'index', 'action' =&gt; 'index', 'route' =&gt; 'admin/default', ), 'album' =&gt; array( 'label' =&gt; 'Album', 'controller' =&gt; 'index', 'action' =&gt; 'index', 'route' =&gt; 'album/default', ), /* ... */ </code></pre> <p>Routing is configured like it is true. Navigation in the menu works. Links menu lead to the desired controller/action of the desired module. But while introducing menu and a transition to one or another menuitem, active marked both points simultaneously and 'Administration' and 'Album'. As I understand it, for the reason that match the names of controllers and actions with them, but there's still the 'route' and it's different... not for nothing that the generated different url for each item... but somehow, despite this, they both are marked as active. </p> <p>Routing config:</p> <pre><code> 'router' =&gt; array( 'routes' =&gt; array( 'admin' =&gt; array( 'type' =&gt; 'Literal', 'options' =&gt; array( 'route' =&gt; '/admin', 'defaults' =&gt; array( '__NAMESPACE__' =&gt; 'Admin\Controller', 'controller' =&gt; 'Index', 'action' =&gt; 'index', ), ), 'may_terminate' =&gt; true, 'child_routes' =&gt; array( 'default' =&gt; array( 'type' =&gt; 'Segment', 'options' =&gt; array( 'route' =&gt; '/[:controller][/:action[/id:id]]', 'constraints' =&gt; array( 'controller' =&gt; '[a-zA-Z][a-zA-Z0-9_-]*', 'action' =&gt; '[a-zA-Z][a-zA-Z0-9_-]*', 'id' =&gt; '[0-9]+', ), 'defaults' =&gt; array( ), ), ), </code></pre> <p>Album routing config similar...</p> <p>Why this is happening? Thanks.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload