1

Here's a quick one.

In my navigation.xml I have this type of structure.

    <faq>
        <label>FAQ</label>
        <uri>/frequently-asked-questions</uri>
        <controller>faq</controller>
        <action>index</action>
    </faq>

When using the view helper $this->navigation()->menu() is there a way to display the uri as the link, instead of the normal link that is generated through the controller/action structure?

for example I don't want the helper to render <a href="/faq">FAQ</a> like it normally would, I want it to render <a href="/frequently-asked-questions">FAQ</a>. (the uri's tie in with my Routes)

Thanks for any help, I'm a little bit stuck on this one.

Cheers.

shane
  • 852
  • 1
  • 8
  • 16

2 Answers2

0

Try setting up your own custom view partial like this guy did. This might be the only way. I'm not 100% sure, though, as Zend_Navivation is one of the few classes that I don't utilize in the Zend Framework. Regardless, he does give a very thorough explanation on how to set all that up. Good luck!

Community
  • 1
  • 1
Yes Barry
  • 9,514
  • 5
  • 50
  • 69
0

According to the Zend_Navigation reference you should be fine by simply ommiting the controller-action part:

<faq>
        <label>FAQ</label> part
        <uri>/frequently-asked-questions</uri>
</faq>

http://framework.zend.com/manual/en/zend.navigation.containers.html

madflow
  • 7,718
  • 3
  • 39
  • 54