views:

438

answers:

1

Hi there.

I wonder if you can help me. I am looking to implement multi level navigation, parent section, child, grand child, etc which in cakePHP is straight forward enough using the tree data structure.

However, in terms of the front end, I don't want to just output all pages in the structure. I want to only output the structure of the current page plus any sub sections with the use of a class/id for css. Or any links to examples?

Any ideas on how this would work?

Many thanks.

+1  A: 

CakePHP does exactly what you want. You must define the general layout inside /views/layouts/default.ctp. And then for each page you only put the content inside /views/controller/action.ctp or /views/pages.ctp.

The idea is you won't have to repeat any html structure if you take advantage of cakephp's layouts,views,elements and helpers!

pcp