views:

55

answers:

1

Hi,

I store my navigation content in a navigation.xml file in the configs folder of my project.

Basically I have two modules, the default module that deals with e.g. authentication and basic page usage and the admin module to admininstrate the website.

When I sign in as admin a special admin navigation appears according to my acl and navigation.xml, a navigation element looks like that:

<ticket>
    <label>Tickets</label>
    <resource>admin:ticket</resource>
    <module>admin</module>
    <controller>ticket</controller>
    <action>payticket</action>
    <privilege>ticket</privilege>
</ticket>   

But I have a big Problem with the URL's of my website when I am logged in as admin. I developed my admin module quite late so the url's of the default module look like that:

$this->url(array('controller' => 'index', 'action' => 'contact'))

So I left out the 'module' => 'default' since I do not want the /default/ to appear in the browsers url bar.

When I visit a admin site, e.g. mysite.de/admin/ticket, all url's on my page that normally would point to default module now point to admin module and I get a bad request when I visit them.

$this->url(array('controller' => 'index', 'action' => 'contact'))

normally creates mysite.de/index/contact but on an admin page It becomes mysite.de/admin/index/contact.

Do I have to adjust all links and add the module information or is there another solution?

+1  A: 

If you pasa default as your model, Zend won't include it in your URL, lince it's the default module.

For example buulding the following: - controller: index - action: index - module: default

Will result in a URL of just /.

Chris