first,
put this code to your header template:
//---------------------------
<?php echo $this->renderElement('zone_header'); ?>
//---------------------------
this code will call "app/views/elements/zone_header.thtml"
inside "zone_header.thtml" put another code:
//---------------------------
<?php echo
$this->requestAction("zones/dynamicheader",array('return'));?>
//---------------------------
this code will call as a regular url action submit to you website as
"http://yourdomain.org/zones/dynamicheader", so you must create your
controller "zones", model "zone", and view
"app/views/zones/dynamicheader.thtml".
Now is up to you, how many model you want to use in your model and how
you control your data in your class ZonesController -> method /
function "dynamicheader()".
Regards,
Widi Harsojo.
On Nov 13, 1:36 am, "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
-~----------~----~----~----~------~----~------~--~---