I'm not sure exactly what you mean, but if this sounds like it could
work for you it has done wonders for me so far.

Borrowed the concept from WordPress in a way. In my layout I check for
the existence of a variable called $header, if it exists I output it,
if it doesn't I do nothing.

This way, if any of my controllers need to pass header information I
can include it quickly and easily without the hassle.

Does this make sense?

Cheers,
mikee

On 13/11/06, devarz <[EMAIL PROTECTED]> wrote:
>
> How can I add a dynamic header to all pages?
>
> If I create a header template I can include it in all views, but I
> don't know how to go about including the data handling routine to all
> the controllers.
>
> Can I create a dedicated controller for this and let all other
> controllers inherit from it? Or should I create a component handling
> this logic?
>
>
> >
>

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