Fred Jiles wrote:
> 
> Awesome you are the man.  I figured it had to do something with the stack
> and how it was processed.  It doesn't make sense the the default is null,
> why not make the default, default?  This way you don't need to add the
> extra
> markup?
> 
> On Fri, Nov 13, 2009 at 11:45 AM, snakeye <[email protected]>
> wrote:
> 
>>
>> Yes, I've got exactly the same issue. As far as I've explored it, the
>> cause
>> is following:
>>
>> When the menu is rendered for each page is called $page->getHref();
>> Then we fall down to Zend_Controller_Router_Rewrite::assemble and call
>> getCurrentRouteName()
>> After this any url is assembled using current route, in your case -
>> 'storyId'
>>
>> To avoid this, add for every page in your xml navigation definition
>> <route>default</default>
>> --
>> View this message in context:
>> http://old.nabble.com/Zend-Navigation-and-Router-issue-tp26338790p26339585.html
>> Sent from the Zend Framework mailing list archive at Nabble.com.
>>
>>
> 
> 
This changed some time ago. Default is not default any more, but null whic
mean current Route is used for URL assembling. But I made a plugin to solve
this, both url and menu helpers. I do not want to set Default module for
every nav link and every url function.
Here it is:


class My_Controller_Router_Rewrite extends Zend_Controller_Router_Rewrite {

  public function assemble($userParams, $name = null, $reset = false,
$encode = true) {
    if ($name == null) {
      $name = 'default'; // or the name of your Default module
    }
    return parent::assemble($userParams, $name, $reset, $encode);
  }

}

-- 
View this message in context: 
http://n4.nabble.com/Zend-Navigation-and-Router-issue-tp663765p680294.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to