More information about the Underscore mailing list

[_] php - extracting info from a url to set state of nav

juan kennaugh contact at jkennaugh.co.uk
Tue Feb 2 14:06:59 GMT 2010

Hi - I'm no php expert but can anyone give me any tips on how to extract 
a string from a url to find what the current page is and use that to set 
an 'on' state of a nav item...

ie:

http://www.mysite.com/about-us/

extract 'about-us'

then use the string 'about-us' and add a class of 'on' on a nav item 
with the id 'about-us'


Cheers for any forthcoming advice.

Juan