Not at all, calling requestAction() from elements/view is perfectly
acceptable. Though you could also call it from the controller and set a var
for the view to get, but again, I see no issue on the way you are doing it
now (as a matter of fact much of The Bakery elements use this approach.)

Where do you have your cake:nocache statements? Remember that view (not
elements) allow those statements, while elements (in Cake 1.2) can also be
cached.

-MI

---------------------------------------------------------------------------

Remember, smart coders answer ten questions for every question they ask. 
So be smart, be cool, and share your knowledge. 

BAKE ON!

blog: http://www.MarianoIglesias.com.ar

-----Mensaje original-----
De: [email protected] [mailto:[EMAIL PROTECTED] En nombre
de DJ Spark
Enviado el: Lunes, 26 de Marzo de 2007 09:14 p.m.
Para: [email protected]
Asunto: modularity and MVC

  I'd like to know if using requestAction in the view breaks (too
much) the MVC concept, or is it a good use?
  I've been doing due to the 'high' load of a website i'm working. An
example:

<?php echo $this->renderElement('listas/destaque-principal',
array('listas' =>
$this->controller->requestAction('/listas/destaquePrincipal')) ); ?>


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

Reply via email to