i am agree with you euromark, my problem solved.
cricket i want to send some array to some element to only show. in all pages
--
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
wit
jesus christ - how I just love those double posts
it has already been marked as solved here:
http://ask.cakephp.org/questions/view/send_some_result_to_elemetns
Am Montag, 16. April 2012 18:23:16 UTC+2 schrieb cricket:
>
> It's not clear what you mean by getting the data to the element. Do
> you
It's not clear what you mean by getting the data to the element. Do
you mean that you want to render the element, or that the element
contains a call to requestAction()? If so, just return the data
instead of calling set().
On Mon, Apr 16, 2012 at 12:38 AM, hoss7 wrote:
> thank you cricket
>
> bu
thank you cricket
but i cant undrestand where i must put this code,this is my code:
i have one function in newscontroller like this:
function randomnews(){
$rnews=$this->News-find('first',array('order'=>'Rand()');
$this->set('news',$rnews);
}
i want send this result to some element : Elements/
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';
Note: i have cake php 2.1
--
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
cake-php+unsubscr
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:/