You are correct that using elements is a good idea, but the only
problem is that requestAction is really quite a large operation - a
whole extra call through the CakePHP pipeline.  So if you have half a
dozen of these on every page, it really will be inefficient.

So the best solution is to have some beforeFilter action that
determines what elements should be visible on the final page, and
loads the appropriate data directly from the models (not via
requestAction), and sets it for the view.  It's a little more work,
and less "plug and play", but will be noticably faster if you have a
number of elements per page.


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