Hi
What's the convention for specifying additional models in the
controller $uses variable?
I have a controller, DashboardsController, that needs to access the
KpiLevel and KpiColour models as well as the Dashboard model. So my
controller starts:
class DashboardsController extends
I think the main model has to be first. Have a look at
Controller::constructClasses(). Specifically, this line:
$modelClassName = $uses[0];
On Tue, Jun 23, 2009 at 8:44 AM, DavidHdjhollingwo...@gmail.com wrote:
Hi
What's the convention for specifying additional models in the
controller
On Tue, Jun 23, 2009 at 11:10 AM, brianbally.z...@gmail.com wrote:
I think the main model has to be first. Have a look at
Controller::constructClasses(). Specifically, this line:
$modelClassName = $uses[0];
Then have a look at paginate(). I think the problem is that you're not
passing the
Thanks for your help Brian, I'm going to try that now.
Regards
David
On Jun 23, 4:16 pm, brian bally.z...@gmail.com wrote:
On Tue, Jun 23, 2009 at 11:10 AM, brianbally.z...@gmail.com wrote:
I think the main model has to be first. Have a look at
Controller::constructClasses().
Please use this code:
function index() {
$this-Dashboard-recursive = 0;
$this-set('dashboards', $this-paginate($this-Dashboard));
}
On Tue, Jun 23, 2009 at 9:34 PM, DavidH djhollingwo...@gmail.com wrote:
Thanks for your help Brian, I'm going to try that
Thanks Guys
Both solutions worked, not sure if one is 'more correct' than the
other; but both seemed to do the job.
Regards
David
On Jun 23, 7:41 pm, arif hossen arifhossen2...@gmail.com wrote:
Please use this code:
function index() {
$this-Dashboard-recursive = 0;
Why not just called the right Model in pagination?
$this-paginate('Dashboard')
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To