Re: How to get controller name from an element view?
Hi , I tried this solution to get controller name on my layout file, but I am getting an error on CakePHP3 as follows, *Error: * *paramsHelper* could not be found. IS there anyone know a proper solution for this? Regards, Jipson On Friday, 8 February 2008 19:30:35 UTC, Guill3rmo wrote: Hi im newbie and my English still sucks, but i want to know get the controller name since an element view. Thanks. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/d/optout.
Re: How to get controller name from an element view?
I don't think you can use the request object from within an element, but here's the documentation on it. http://book.cakephp.org/3.0/en/controllers/request-response.html#request-parameters If you can't access it from the element you can save it as a variable in your AppController, though this isn't ideal I understand. Hopefully somebody else can chip in and provide a better method On 28 August 2014 13:32, Jipson Thomas jip...@strategic-ic.co.uk wrote: Hi , I tried this solution to get controller name on my layout file, but I am getting an error on CakePHP3 as follows, *Error: * *paramsHelper* could not be found. IS there anyone know a proper solution for this? Regards, Jipson On Friday, 8 February 2008 19:30:35 UTC, Guill3rmo wrote: Hi im newbie and my English still sucks, but i want to know get the controller name since an element view. Thanks. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/d/optout. -- Kind Regards Stephen Speakman -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/d/optout.
Re: How to get controller name from an element view?
Thank you. I got it working by the following command. $this-request-params['controller'] Thanks, Jipson On Friday, 8 February 2008 19:30:35 UTC, Guill3rmo wrote: Hi im newbie and my English still sucks, but i want to know get the controller name since an element view. Thanks. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/d/optout.
Re: How to get controller name from an element view?
Thanks a lot, that´s what i was looking for. On 8 feb, 16:22, MonkeyGirl [EMAIL PROTECTED] wrote: Hi im newbie and my English still sucks, but i want to know get the controller name since an element view. Thanks. Try echoing out $this-params['controller'] - is that what you're after? Hope that helps, Zoe. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com 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 -~--~~~~--~~--~--~---
Re: How to get controller name from an element view?
Hi im newbie and my English still sucks, but i want to know get the controller name since an element view. Thanks. Try echoing out $this-params['controller'] - is that what you're after? Hope that helps, Zoe. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com 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 -~--~~~~--~~--~--~---