sfPatternRouting has a function called getCurrentInternalUri [1], you should use that. Also, there is no reason to use sfContext::getInstance() in this case, you should use $this->getContext()->getRouting().
[1] http://trac.symfony-project.org/browser/branches/1.4/lib/routing/sfPatternRouting.class.php#L130 On Tue, Jul 27, 2010 at 08:53, sebastian <[email protected]> wrote: > You can access routes via sfContext::getInstance()->getRouting()- >>getRoutes() and then go from there > > > > On 27 Jul., 07:15, Johannes Trommer <[email protected]> > wrote: >> Hello, >> >> How can I get the current route name in the module's action? >> >> This is my route: >> >> powerplantsTypes: >> url: /type/:slug.html >> param: { module: powerplants, action: list } >> >> In the action i want the retrieve the route name 'powerplantsTypes'. >> >> Thanks in advance! > > -- > If you want to report a vulnerability issue on symfony, please send it to > security at symfony-project.com > > You received this message because you are subscribed to the Google > Groups "symfony users" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/symfony-users?hl=en > -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
