// class var private $controller; function startup(Controller $controller) { $this->$controller = $controller; }
// in your method you can call controller methods like so: $this->controller->set('your_view_var', $data); $this->controller->render(...); etc. On Thu, Mar 7, 2013 at 3:51 PM, André Luis <cavall...@live.com> wrote: > Nothing? > > > Em quinta-feira, 23 de agosto de 2012 14h19min07s UTC-3, André Luis > escreveu: >> >> I will explain a little bit better... >> >> I need to create a content block to use in my layout, for example... >> >> echo $this->fetch('my_custom_content'); >> >> BUT, the data for this my_custom_content comes from a Component, for >> example in AppController: public $components=array('MyCustomComponent'); AND >> this component get the data from the database through a Model... >> >> Is it possible? > > -- > 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?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > > -- 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?hl=en. For more options, visit https://groups.google.com/groups/opt_out.