Hi, I want to add a "selected" class name to every link that match the current uri. My approach for verifying the correspondence between the link (a route name, a group of module/action etc) and the uri is the following:
if (sfContext::getInstance()->getRequest()->getUri() == sfContext::getInstance()->getController()->genUrl($link, true)) { $params['class'] = 'selected'; } echo link_to($label, $link, $params); Is this the right approach? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---