Am I off-base in thinking this could be built-in to MenuBundle? I've always tried to organize the pages in my web apps into a tree structure like that. Guess it's not as common as I'd expected.
Thanks Daniel for the direction. Paul On Sat, May 28, 2011 at 2:47 AM, danielholmes <dan...@creatio.com.au> wrote: > Hi Paul, > > You can do this by creating your own menu item. e.g.: > > > $menu = new Menu(array(), 'MyProject\MyMenuItem'); > ... > $request = $this->get('request'); > $menu->setCurrentUri($request->getUri()); > > > namespace MyProject; > use Knplabs\Bundle\MenuBundle\MenuItem as BaseMenuItem; > class MyMenuItem extends BaseMenuItem > { > public function getIsCurrent() > { > // TODO: Use $this->currentUri to do your own logic and work > out if it > // should be marked current > } > } > > On May 28, 7:08 am, Paul Dugas <p...@dugasenterprises.com> wrote: >> I have a "main" menu that gets embedded via Twig in my site-wide page >> header. I've created additional menus for some of the deeper sections >> of the content. I'm wondering how I get the main menu to mark an >> entry "current" in a page that is logically under one of the pages >> referenced by that main menu item. Is there a way to tell the main >> menu that the item for the /foo route should be marked current when >> any route starting with /foo is being handled? >> >> Paul > > -- > If you want to report a vulnerability issue on symfony, please send it to > security at symfony-project.com > > You received this message because you are subscribed to the Google > Groups "symfony users" group. > To post to this group, send email to symfony-users@googlegroups.com > To unsubscribe from this group, send email to > symfony-users+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/symfony-users?hl=en > -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en