tags:

views:

69

answers:

2

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
+1  A: 

Also look at Request::$uri which you can access using Request::instance()->uri:

if (Request::instance()->uri === $link) $active = TRUE;
shadowhand