http://api.cakephp.org/class/helper tells us that $helper->here is the
url being visited. You can Router::parse() to extract information,
including the controller, from a url.

On Thu, 2010-01-28 at 08:02 -0800, Raven wrote:
> Hi there,
> 
> I know this is probably a really basic question, but how would I go
> about detecting the current controller from within a helper?
> 
> As of right now I'm manually passing the controller name from within
> the view... which doesn't seem terribly efficient.
> 
> Thanks in advance for any help!
> 
> Check out the new CakePHP Questions site http://cakeqs.org and help others 
> with their CakePHP related questions.
> 
> You received this message because you are subscribed to the Google Groups 
> "CakePHP" 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/cake-php?hl=en


Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" 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/cake-php?hl=en

Reply via email to