Re: Migration from CakePHP 1.1.x to CakePHP 1.2.x - how to acces controller component from view?
Thanx for this suggestion On 9/1/08, Dardo Sordi Bogado <[EMAIL PROTECTED]> wrote: > > Also, for reading session values use the session helper, avoid > accessing controller/components in view, you certainly can push all de > data from the controller to the view. I'm no MVC cop, but try to keep > views clean. > > On Thu, Aug 28, 2008 at 4:14 AM, Bernhard J. M. Grün > <[EMAIL PROTECTED]> wrote: >> >> Hi! >> >> This is quite easy. It is just >> $account = $this->Session->read('Account'); >> >> >> On 28 Aug., 07:35, Pizgin <[EMAIL PROTECTED]> wrote: >>> Hi! Before was >>> >>> $account = $this->controller->Session->read('Account'); >>> >>> On CakePHP 1.2.x this not work. Have error: >>> >>> Undefined property: View::$controller [APP/views/elements/cart.thtml, >>> line 3] >>> >>> Tell me please how i can acces to controller component from the view? >> >> > >> > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" 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: Migration from CakePHP 1.1.x to CakePHP 1.2.x - how to acces controller component from view?
Also, for reading session values use the session helper, avoid accessing controller/components in view, you certainly can push all de data from the controller to the view. I'm no MVC cop, but try to keep views clean. On Thu, Aug 28, 2008 at 4:14 AM, Bernhard J. M. Grün <[EMAIL PROTECTED]> wrote: > > Hi! > > This is quite easy. It is just > $account = $this->Session->read('Account'); > > > On 28 Aug., 07:35, Pizgin <[EMAIL PROTECTED]> wrote: >> Hi! Before was >> >> $account = $this->controller->Session->read('Account'); >> >> On CakePHP 1.2.x this not work. Have error: >> >> Undefined property: View::$controller [APP/views/elements/cart.thtml, >> line 3] >> >> Tell me please how i can acces to controller component from the view? > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" 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: Migration from CakePHP 1.1.x to CakePHP 1.2.x - how to acces controller component from view?
Hi! This is quite easy. It is just $account = $this->Session->read('Account'); On 28 Aug., 07:35, Pizgin <[EMAIL PROTECTED]> wrote: > Hi! Before was > > $account = $this->controller->Session->read('Account'); > > On CakePHP 1.2.x this not work. Have error: > > Undefined property: View::$controller [APP/views/elements/cart.thtml, > line 3] > > Tell me please how i can acces to controller component from the view? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" 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 -~--~~~~--~~--~--~---
Migration from CakePHP 1.1.x to CakePHP 1.2.x - how to acces controller component from view?
Hi! Before was $account = $this->controller->Session->read('Account'); On CakePHP 1.2.x this not work. Have error: Undefined property: View::$controller [APP/views/elements/cart.thtml, line 3] Tell me please how i can acces to controller component from the view? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" 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 -~--~~~~--~~--~--~---