You can try just doing
$variable =& new $Model;
inside your component. This will create a reference to the model for
you without relying on the controller.
Bryan
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "C
I am not sure exactly what is your intention, but isn't the problem using same name for Model and Component?Either reference must be overwritten in controller.Also, if you want to access to model and/or set data for view,
it should be done through controller, I believe.So, in component, it should b
Sorry, this is me being absolutely stupid. My problem, which is
probably totally unrelated to Zoltan's, was that my User model was in
a plugin (I thought it'd be easier to organise it that way). Hence
whenever I wasn't in the plugin, my main application couldn't access
the model for it.
--~--~
Scratch that, my implementation was broken, and currently I don't know
why. Perhaps someone more experienced can tell the both of us how
exactly we can access Models in Components?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the G
You should be able to use $this->controller->ProductSection to get
access to your model, it's what I've done in my Auth component and it
seems to work ok. It's just that extra level of redirection there :)
--~--~-~--~~~---~--~~
You received this message because yo
Hi,
I'm quite new to Cake and I have a question about components/elements
Basically I have a site where there will be a list of categories on
different pages
e.g.
var $name = 'Searches';
var $components = array('ProductSection');
var $uses = 'ProductSection';
functi