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/sidebar2.ctp
to show some random news in this element,i dont need user request this
action,i need show automatic result when page loading
i hope you can show me how can i edit this code to show result in elements
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