On Jun 12, 2007, at 2:41 PM, andy wrote:

>
> Hi everyone.
>
> I'm towards the end of finishing up a blog-type project using
> CakePHP.  My question has to do with "element blocks".  I'm not sure
> what they are called, but for example, on many websites there are
> often side boxes that have different information in them.  For example
> a login box, or a user information box, etc.
>
> What is the best way to set up something like this in CakePHP?
>
>
> I've tried making each block I want to use an "element" but... I
> really want this to be modular.  So what do I do with the controller
> data I need to pass to each element?

Grab it via requestAction().

I'd just write the logic for a given element in a controller action,  
create the view logic in the element file, and call

$this->renderElement('element-name', $this->requestAction('/ 
controller/action'));

-- John

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