Thank you! I guess a helper is what I needed.
On 30 mayo, 19:16, francky06l <[EMAIL PROTECTED]> wrote:
> > I want to know what is the correct way to add PHP to static pages (the
> > ones that live in views/pages). I want to use a function across many
> > pages.
>
> Probably in an helper.
>
>
>
> > I also want to render an element in my home page, but I don't know
> > where I should put the code to set the element's variables.
>
> in pagesController, you can use $this->set(...)
> in the views: $this->renderElement('name', array('var' => 'values'));
>
> it does not differ much from other pages, unless I misunderstood the
> question ...
>
> hth
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" 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
-~----------~----~----~----~------~----~------~--~---