Definitely us an Element. I recently did a project and had the same thing. Several shared navigation elements that I needed in all of my layouts. I created a default layout - and then used renderElement to render them in the layouts/views.
I think this is exactly what you are looking for. Email me if you need any help or have other questions... On Feb 14, 9:22 am, "Peter" <[EMAIL PROTECTED]> wrote: > Hi there, > > I'm totally new to CakePHP and I am struggling to get my head around > how to do shared navigation across a site. Basically, every page will > use the same unordered list navigation on the left-hand side. > Regardless of the page controller, I need to have this navigation on > all pages. The function that will create the navigation will take in a > variable that denotes the current section (so it can be marked as > 'active'). > > Having looked through the CakePHP manual and taken a look at some of > the posts here, I can see that some people have created a navigation > component, and some a navigation helper. I decided to take a shot at > creating a Navigation Component, but accessing the database directly > from the component seems to be a bit of a problem, so I thought I > might be going about this the wrong way. > > Would anyone be able to point me in the right direction on how to do > this? > > Thanks for reading! --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
