Re: Best practice: using class on all pages

2014-08-14 Thread Sam Clauw
Okay, outputting an ulli structure with an element is indeed very usefull. It can appear in multiple areas on the template files. I understand that I should do something like: echo $this-element('mainmanu', array( 'tree' = array(...), 'active' = array(...) )); The tree array holds the

Re: Best practice: using class on all pages

2014-08-11 Thread thanat
I would use element for rendering and request action to get the correct data for menu. On Monday, August 11, 2014 12:26:47 AM UTC+2, Sam Clauw wrote: I want to write a class that use a left value and a depth value so it can print an ulli output for a menu. I want it to be able in my CMS

Best practice: using class on all pages

2014-08-10 Thread Sam Clauw
I want to write a class that use a left value and a depth value so it can print an ulli output for a menu. I want it to be able in my CMS plugin AND in my front-end pages. My question is: where should I put that class? Some options I've been thinking on: 1. Everything in AppModel.php