Hi. I am storing my menues and links(tree behavior) in database. I am using several themes for the system, and hardcoding menues manuallly foreach theme is not an option.
I have no problem outputting the menues and links with a component and helper in my themes, but i am simply wodering about the best practice to do this? Example, get menues and links from db in component, generate menu output with helper. Or should i do all this in the helper? Thanks! tom On Dec 8, 11:42 pm, Perry <[email protected]> wrote: > why consider components and helpers? > > do you store your menu structures in database? why not just treat it as a > data and output it directly in layout? > > > > > > > > > > On Fri, Dec 9, 2011 at 9:31 AM, MetZ <[email protected]> wrote: > > Hi all! > > > I am looking for a couple of suggestions. > > > I am currently working on a tree menu part of my app, where > > administrators can create menues, add links to the menues and move the > > links up and down in the tree. > > > Now, I am looking how to output this menu with links on the frontend. > > > Any suggestions on how I should proceed in this? > > > Currently, I am getting my menues and links in a component, I am > > initializing the "getmenues" function in component from > > app_controller.php. > > > And in my views, I call a helper to build the menu ul li li /ul > > > Do I need to use a component for this task? Or can I just include > > everything in the helper? the database calls I mean? > > > I have noe experience with helpers and components from before, so > > please be gentle with me ;) > > > Thanks for any and all help on this issue!! > > > BTW: Cake 1.3.13 > > > -Tom > > > -- > > Our newest site for the community: CakePHP Video Tutorials > >http://tv.cakephp.org > > Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help > > others with their CakePHP related questions. > > > To unsubscribe from this group, send email to > > [email protected] For more options, visit this group > > athttp://groups.google.com/group/cake-php > > -- > Perry | 彭琪http://pengqi.me -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php
