On Fri, 16 Jun 2006 12:10:19 -0000
"nate" <[EMAIL PROTECTED]> wrote:

> 
> All the situations you've described above can easily be handled by
> existing code:
> Either
> $this->renderElement(...

Yes, i know renderElement() does this. The thing is elements are all
stored together in views/elements. If i want to have elements that are
used only inside some controller's views i'll have to mix them with
"global" elements.

> or
> include $this->element(...

Humm. Don't know this one. Can you elaborate? Some examples?

> in the view, or
> $this->render(...
> in the controller.

The reason i don't use requestAction() is because the action that renders
the sub-view renders it using ajax layout. The action where i want it to
be included renders it using default (or whatever) layout, so that
doesn't work. 

Also, the action that renders the sub-view also does some other stuff and
i just want the piece of HTML to be inserted in the view. Even if the
action didn't produce side-effects, i wouldn't want to repeat unnecessary
code (like getting the list of items to be displayed, which is already
done in the index action and would be repeated in the sub-view action).


Don't get me wrong but why so reluctant in implementing the feature? It
would be a simple change in renderElement(), backward-compatible and
useful feature.


Thanks for your feedback.

-- 
Gonçalo Marrafa <[EMAIL PROTECTED]>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---

Reply via email to