> One thing that might be relevant and becomes interesting in 1.2 is the
> ability to cache elements (which I alluded to covertly in my previous
> message); so instead of putting effort into the component/controller
> side of things, you /could/ put requestAction or other logic in your
> element and cache the result.

If I understand you correctly, this means in 1.2 using requestAction
within elements won't affect loading times so dramatically? That's
good news!

But it is probably still good practice to keep our systems light ;)

One more question about the mini-contollers method in combination with
plugins:

I've put my component in:

app/plugins/plugin_name/controllers/components/component_name.php

The model I want to load from the component resides in plugins/models/
model_name.php but has a different name than the main plugin.

When I use loadmodel('model_name'); Cake doesn't find the model I'm
looking for, and when I use loadPluginModels('model_name'); it seems
to find the plugin's app_model, not the model in the "models" folder
(which has a different name from the plugin's app_model, because I
want to be able to have several models in one plugin folder).

How can I acces that model from within the component?

thx for the great job you did on the mini-contollers, I really use
them a lot!

Gerben.

On 2 apr, 14:01, "AD7six" <[EMAIL PROTECTED]> wrote:
> On Apr 2, 1:40 pm, "gerbenzomp" <[EMAIL PROTECTED]> wrote:
>
> > The problem seemed to be that I cannot pass the variable $this->name
> > through requestaction.
>
> It would probably get overwritten if you put it in the params as
> 'name', but you could have passed it either
>
> in the url
> echo $this->requestAction ('/url/stuff/camefrom:'.$this->name.'.'.
> $this->action..
>
> or as a a differently named parameter.
> echo $this->requestAction ('/url/stuff', array('camefrom'=>'.$this-
>
> >name.'.'.$this->action..
> > So that's another reason (apart from loading
> > times) to use your 'mini-controllers' approach in this case. Thnx,
> > it's working now!
>
> Cool.
>
>
>
> > Is your mini-controllers method ever going to be a standard part of
> > Cake? Because if requestAction is so heavy this is a great workaround!
>
> I wouldn't expect so, it's not really adding to cake but using it.
> Also I don't know if it duplicates something that is planned or
> already present. But who knows.
>
> One thing that might be relevant and becomes interesting in 1.2 is the
> ability to cache elements (which I alluded to covertly in my previous
> message); so instead of putting effort into the component/controller
> side of things, you /could/ put requestAction or other logic in your
> element and cache the result.
> it works like this echo $this->element('elementname',array('cache'=>'1
> week',other=>sfuff,if=>necessary));
>
> Anyway, glad you found a solution,
>
> cheers,
>
> AD


--~--~---------~--~----~------------~-------~--~----~
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