Hi all,

I have the following route in my application:

$route  = new Zend_Controller_Router_Route_Regex(

            'MODULE_HERE/news/[0-9a-z\._!;,\+\-%]+-(\d+)',

            array(
               'module' => 'MODULE_HERE',
                'controller' => 'entry',
                'action'     => 'view'
            ),

            array(
                'id' => 1
            )

);

I want this route to map to URLs:

http://www.example.com/MODULE_NAME/news/news-1
http://www.example.com/MODULE_NAME/news/more-news-2

This needs to forward request above (mask) to the entry controller / view
action equivalents :

http://www.example.com/MODULE_NAME/entry/view/id/1
http://www.example.com/MODULE_NAME/entry/view/id/2

The problem I am facing is getting the MODULE_NAME from the route URL and
using it to map to the entry controller/view action of the correct
MODULE_NAME.

Using the default router works fine and detects module i.e. typing the
following directly as URL works:
http://www.example.com/MODULE_NAME/entry/view/id/1 but using my route mask
does not...

Can somebody please help me?

Thanks,

David







-- 
View this message in context: 
http://www.nabble.com/Getting-Module-name-from-custom-Route-mask-using-Zend_Controller_Router--tp20622773p20622773.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to