Thank you, Hector! Just what I needed. Boy, that was easy.

Corey

On Fri, 8 Jan 2010 08:30:35 -0800, "Hector Virgen" <[email protected]>
said:
> That tutorial seems to be a bit dated as is not using Zend_Application.
> You
> can still follow the suggestion and write a _initRouter() method to add
> that
> code, or you can use the built in router resource plugin. Using the
> plugin
> is probably simpler -- just edit your application.ini.
> 
> To use the built-in plugin, just append "resources.router." to each line
> in
> the article's example ini and copy it into your application.ini.
> 
> This:
> 
> routes.popular.route = popular/:type/:page/:sortOrder
> 
> becomes this:
> 
> resources.router.routes.popular.route = popular/:type/:page/:sortOrder
> 
> etc.
> 
> For some reason, there doesn't seem to be any documentation on this
> plugin.
> 
> --
> Hector
> 
> 
> On Fri, Jan 8, 2010 at 5:58 AM, gelform <[email protected]> wrote:
> 
> >
> > I'm trying to use the router for friendly URLs. I'm following this
> > tutorial:
> > http://sourcecodebean.com/archives/friendly-urls-and-the-zend-router/31
> >
> > It tells me to add this to my bootstrap:
> > $config = new Zend_Config_Ini(APPLICATION_PATH . 
> > &#8216;/config/routes.ini&#8217;);
> > $router = $frontController->getRouter();
> > $router->addConfig($config,&#8216;routes&#8217;);
> >
> > However my bootstrap looks like this:
> > class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
> > {
> >    protected function _initAutoload()
> >    {
> >        $moduleLoader = new Zend_Application_Module_Autoloader(array(
> >            'namespace' => '',
> >            'basePath'  => APPLICATION_PATH));
> >        return $moduleLoader;
> >
> >    }
> >
> >    function _initViewHelpers()
> >    {
> >        $this->bootstrap('layout');
> >        $layout = $this->getResource('layout');
> >        $view = $layout->getView();
> >    }
> > }
> >
> > Where do I create the router?
> >
> > Thanks,
> >
> > Corey
> > --
> > View this message in context:
> > http://n4.nabble.com/Where-to-instantiate-router-in-my-bootstrap-tp1009683p1009683.html
> > Sent from the Zend Framework mailing list archive at Nabble.com.
> >

//
Corey H Maass
Gelform Design
Brooklyn, NY
Web design and development for art and business

em [email protected]
ww http://www.gelform.com
ph 646/228.5048
fx 866/502.4861
IM gelform
tw http://twitter.com/coreymaass
fb http://facebook.com/coreymaass

Reply via email to