Hi All,

I'm still struggling with the router. Here is the idea. On any page you type
/_preview after the uri to see the cms preview of that page. Here is the
code:

$ctrl = Zend_Controller_Front::getInstance();
       $router = $ctrl->getRouter();
                $router->addRoute('cms', new 
Zend_Controller_Router_Route('*/:_preview',
                array('cmsPreview' => 'true')));

I've put this in a routeStartup plugin.

This works fine EXCEPT, the cms uses the default module, controller and
action params which have been wiped by the new router. I see that the
default router users Zend_Controller_Router_Route_Module. Is there a way to
tack on the above logic (*/:_preview = 'cmsPreview' => 'true') to the
default router? The main thing is keeping the default params (which is the
same problem as in my earlier posts).

Thanks


Waigani wrote:
> 
> It is for a login form which logs you into the current page. So I'm
> actually after module, controller action names. I'll just do it as a
> plugin.
> 
> 
> 
> Leo Büttiker wrote:
>> 
>> Ohh, I'm sorry I didn't read the hole thread. For getModuleName you have
>> to
>> probably do it in a plugin in the routeShutdown() methode. But why do you
>> need the modulname there? You can access to it in the controller anyway.
>> 
>> -----Ursprüngliche Nachricht-----
>> Von: Waigani [mailto:[EMAIL PROTECTED] 
>> Gesendet: Montag, 1. Oktober 2007 11:04
>> An: [email protected]
>> Betreff: Re: [fw-general] AW: getRequest
>> 
>> 
>> So how do you do it in the bootstrap? I'm guessing you getModuleName
>> after
>> $front->dispatch()?
>> 
>> 
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/getRequest-tf4531440s16154.html#a13014626
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to