Re: Pulling data to the home page
I tried using the requestaction method, but could only get back empty sets. If I do this...I get my dataset: var $uses = array('user'); function index() { $mdlUser = new User(); $this-set('data', $mdlUser-getUserList()); } If I do this, I get an empty dataset: function index() { $this-set('users', $this-requestAction('/users/getUserList')); } I'd prefer to use the request action for ajax reasons. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Pulling data to the home page
AD7six wrote: You could just put echo $this-requestAction (/users/getUserList,array(return=true)); I'm sorry. I tried this method and got a full page loading into another full page. AD7six: I used the method as described in the manual: http://manual.cakephp.org/chapter/controllers function index() { $this-set('users', $this-requestAction('/users/getUserList')); } My userscontroller has the getUserList function, and my user model has the getUserList call that is a findAll(). Like I said, it works with the aforementioned way of using the model directly, but when I try to use the requestAction it doesn't work. The manual seems wrong or am I missing something? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Pulling data to the home page
Hi I'm currently testing cakePHP to decide if our company should switch over. I have a quick question which I'm sure is a snap for you gurus to answer. I want my homepage to draw a collection of requests from various database tableseach dataset will populate various elements on the homepage. The homepage has no db table. If I use the pagecontroller I only get static content from the static home.thtml template. If I create a new controller and set the routing to use a new controller and view, I have to create a model and database table, but I don't need a homepage table. I'm definately missing something here.. How do I get data to the homepage without having a model and matching table? Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Pulling data to the home page
I knew it was something easysheesh. Thanks John. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---