bcosca/fatfree — pull request #110 by stevewasiura (2012-09-19 16:23:31+00:00)
Title: RUN, add URI_SEGMENTS var

add request URI segments to F3 var "URI_SEGMENTS" for easy access.

example usage would be for use in nav menu, when you need to know the first uri segment
to highlight an item in nav menu

/pages/about
/pages/welcome
/pages/contact

if you use a 2 level nav menu system, you always want top level menu item label 'Pages' to be highlighted for the above pages etc.

i.e. example template psuedocode

repeat loop through nav menu li items
if={{ nav_menu['link_p1'] == @URI_SEGMENT[1] }}
apply css class for highlight