Question

I'm in a situation where I have a Zend_Navigation menu defined in XML. In the menu, the design requires a single page for displaying user data. Administrators may view other users' data. Because there are subtle differences in the data displayed and view layouts, it's necessary to have two actions, one for normal users, and one for administrators.

How can I define a Zend_Navigation XML file so that two actions on the same controller both set the same page as active? Preferably using only XML. Is it even possible?

Was it helpful?

Solution

<?xml version="1.0" encoding="UTF-8" ?>
<configdata>
  <nav>
    <home>
      <label>Home</label>
      <controller>test</controller>
      <action>menu</action>
      <module>default</module>
      <pages>
        <why>
          <label>why</label>
          <controller>test</controller>
          <action>menu</action>
          <module>default</module>
          <visible>false</visible>
        </why>
        <who>
          <label>who</label>
          <controller>test</controller>
          <action>quake</action>
          <visible>false</visible>
        </who>
      </pages>
    </home>

The idea is to make both pages invisible and both should be the children of a visible page, which will be displayed as active.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top