I have found the beforeRender() function.
I think this is what I need.

On Jun 24, 3:56 am, Contrid <[EMAIL PROTECTED]> wrote:
> Sorry if I'm not being clear...
>
> Say for instance I have a layout like this :
>
> <html xmlns="http://www.w3.org/1999/xhtml";>
> <head>
> <title><?= $title_for_layout?></title>
> </head>
> <body>
>
> <?= $content_for_layout ?>
>
> <?= $sidebar ?>
>
> </body>
> </html>
>
> ...where $sidebar needs to have dynamic content.
> It should also be global...visible on all pages of a specific layout.
> How will I go about this?
>
> I'm not sure if elements are only for static content.
>
> On Jun 24, 3:16 am, Contrid <[EMAIL PROTECTED]> wrote:
>
>
>
> > I have discovered the "views/elements" folder. This already helps
> > alot.
> > I created a file named "sidebar.thtml" in the "elements" folder.
> > Now...I need to somehow parse data to the "sidebar" view.
>
> > On Jun 24, 3:13 am, Contrid <[EMAIL PROTECTED]> wrote:
>
> > > Good day,
>
> > > I started reading through the CakePHP manual and stuff today.
> > > I'm new to MVC and this is the first time I work with it. Please bare
> > > with me.
>
> > > In my default layout ("layouts/default.thtml") I want to have a
> > > dynamic sidebar which comes consists of data coming from the database.
> > > For example...it could be an array, each key being an array with an ID
> > > and a Title.
>
> > > How will I go about creating a dynamic sidebar?
> > > Do I create a controller for it, or how?
>
> > > Thank you for your help.
>
> On Jun 24, 3:16 am, Contrid <[EMAIL PROTECTED]> wrote:
>
> > I have discovered the "views/elements" folder. This already helps
> > alot.
> > I created a file named "sidebar.thtml" in the "elements" folder.
> > Now...I need to somehow parse data to the "sidebar" view.
>
> > On Jun 24, 3:13 am, Contrid <[EMAIL PROTECTED]> wrote:
>
> > > Good day,
>
> > > I started reading through the CakePHP manual and stuff today.
> > > I'm new to MVC and this is the first time I work with it. Please bare
> > > with me.
>
> > > In my default layout ("layouts/default.thtml") I want to have a
> > > dynamic sidebar which comes consists of data coming from the database.
> > > For example...it could be an array, each key being an array with an ID
> > > and a Title.
>
> > > How will I go about creating a dynamic sidebar?
> > > Do I create a controller for it, or how?
>
> > > Thank you for your help.


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