Disable autoLayout and set the controller's view to the element. If
this is an AJAX request and you're using RequestHandler, it will deal
with the first. Then just render.

$this->set('data', $some_data);

if ($this->RequestHandler->isAjax())
{
        $this->viewPath = 'Elements'.DS.'FooBars';
        $this->render('element_name');
}


On Sun, Apr 15, 2012 at 3:00 AM, hoss7 <[email protected]> wrote:
> hi
> i have news controller,in this contoller i have some function for show
> random news.
> i want send this array result to some element.
> what i am must to do?
>
> thanks
>
> --
> Our newest site for the community: CakePHP Video Tutorials 
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help 
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> [email protected] For more options, visit this group at 
> http://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to