Hi All,

first, I'm a bit of a newby to cakephp, but already loving it.

I made some models, associations, controllers etc and I'm still using
scaffolding (suites for now) to manage the contents of the database.
Then I made some pages wich soon became something like a website.

I came across a problem: How to pass data from the database (using the
models) to the pagescontroller.

I'm almost sure that there has to be a simple way to do that.
At the moment I used the following as a solution:

I created a basic page model and copied the pages controller from the
lib/controllers directory to my own controllers directory. In the pages
controller I made var $uses = array('Package') ... (the model I want to
use) and then $this->set('packages',$this->Package->findAll());

Now I can use the data from the Package model.

Is this the way or is there a standard way to do this?

Another way could be to extend the PagesController, but what name
should I give it and in what file does that go. That way I can avoid
copying the pages_controller file.

Please help...


--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to