Works like a charm, thanks! Regards, Saša Stamenković
On Sat, Feb 6, 2010 at 6:30 PM, Konr Ness [via Zend Framework Community] < [email protected]<ml-node%[email protected]> > wrote: > Sasa, > > I got it working by setting the default action to "index": > > resources.router.routes.sitemap.route = "sitemap.xml" > resources.router.routes.sitemap.defaults.controller = "sitemap" > resources.router.routes.sitemap.defaults.action = "index" > > resources.router.routes.sitemap.defaults.format = "xml" > > Also, you shouldn't have to disable the layout in your index action. The > context switch will do this automatically. This will make it work with the > html context (which will need a layout, presumably). > > Konr > > > On Fri, Feb 5, 2010 at 11:01 AM, umpirsky <[hidden > email]<http://n4.nabble.com/user/SendEmail.jtp?type=node&node=1471440&i=0> > > wrote: > >> >> Hi. >> >> I have sitemap controller >> >> <?php >> class SitemapController extends Zend_Controller_Action { >> public function init() { >> $this->_helper->contextSwitch >> ->addActionContext('index', 'xml') >> ->initContext(); >> } >> >> public function indexAction() { >> $this->view->layout()->disableLayout(); >> } >> } >> >> And I want to have xml and html version of sitemap. >> >> I added route >> >> resources.router.routes.sitemap.route = "sitemap.xml" >> resources.router.routes.sitemap.defaults.controller = "sitemap" >> resources.router.routes.sitemap.defaults.format = "xml" >> >> But when I visit http://test.com/sitemap.xml, i get html version. >> >> How can I pass format parameter to be xml and have sitemap.xml in my url. >> >> Regards, >> Sasa Stamenkvovic. >> -- >> View this message in context: >> http://n4.nabble.com/Sitemap-route-tp1470493p1470493.html >> Sent from the Zend Framework mailing list archive at Nabble.com. >> > > > > ------------------------------ > View message @ http://n4.nabble.com/Sitemap-route-tp1470493p1471440.html > To unsubscribe from Sitemap route, click here< (link removed) ==>. > > > -- View this message in context: http://n4.nabble.com/Sitemap-route-tp1470493p1471827.html Sent from the Zend Framework mailing list archive at Nabble.com.
