Heya, I'm creating a menu and was wondering if how i would add a class of "current" on a menu for the current page e.g. http://emberapp.com/. Any help appreciated!
+1
A:
Just tell the view which slug is active, and do
<li<?php echo ($activeSlug === $thisSlug) ? ' class="active"' : NULL; ?>></li>
alex
2010-06-23 04:38:04
+1
A:
Also look at Request::$uri which you can access using Request::instance()->uri
:
if (Request::instance()->uri === $link) $active = TRUE;
shadowhand
2010-07-11 19:49:42