Re: Do you hardcode your menu links?

2007-12-05 Thread Arne-Kolja Bachstein
Hi, many thanks for your answers so far. I think I'll implement a mix of elements and a generic model for this, to configure the links from within the backend. I think that's a nicer way than putting it into a config file or something. I had this in mind earlier, but have been in doubt if it

Re: Do you hardcode your menu links?

2007-12-05 Thread powtac
Could anybody publish his menuHelper? It would be very fine for beginners (like me). --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To

Re: Do you hardcode your menu links?

2007-12-05 Thread Jon Bennett
Could anybody publish his menuHelper? It would be very fine for beginners (like me). I have published one previously to cakeforge. I've just updated it to handle 2 tier structures: http://cakeforge.org/snippet/download.php?type=snippetid=361 hth jon -- jon bennett w: http://www.jben.net/

Re: Do you hardcode your menu links?

2007-12-05 Thread Adam Royle
@Arne Try and it and test the speed. I ended up caching my rendered menu in an element based on the page. @powetac I do intend to release my helper, except the code that selects the current page is not 100% accurate (and is a bit slow, because it analyses route data as well). But I can still

Re: Do you hardcode your menu links?

2007-12-05 Thread powtac
Thanx a lot! This is how I used it successfully with cakePHP 1.2: 1. Downloaded http://cakeforge.org/snippet/download.php?type=snippetid=361 into /app/views/helpers/menu.php 2. Added var $helpers = array('Menu'); to class AppController in /app/app_controller.php 3. Added ?php $navi

Do you hardcode your menu links?

2007-12-04 Thread Arne-Kolja Bachstein
Hi there, I've got a quite generic question... do you usually hardcode your menu links [in your views] when developing something with cake, or do you implement something like link management models or something? What's the usual way here in your opinion? Greetings Arne

Re: Do you hardcode your menu links?

2007-12-04 Thread kristofer
I usually pull in an element to handle dynamic navigation. On Dec 4, 4:46 pm, Arne-Kolja Bachstein [EMAIL PROTECTED] wrote: Hi there, I've got a quite generic question... do you usually hardcode your menu links [in your views] when developing something with cake, or do you implement

Re: Do you hardcode your menu links?

2007-12-04 Thread DragonI
I store menu and submenu links in a config file as an array which is loaded and cached in beforeRender in app_controller. I have my own menu helper which displays the menu in an element $config['mainMenu'] = array( 1 = array( 'title' = 'Home', 'url' = '/', 'desc' =