Re: send some result to elemetns

2012-04-16 Thread hoss7
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

Re: send some result to elemetns

2012-04-16 Thread euromark
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

Re: send some result to elemetns

2012-04-16 Thread lowpass
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

Re: send some result to elemetns

2012-04-15 Thread hoss7
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/

Re: send some result to elemetns

2012-04-15 Thread lowpass
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';

Re: send some result to elemetns

2012-04-15 Thread hoss7
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

send some result to elemetns

2012-04-15 Thread hoss7
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:/