From: Michael Tremer Date: Thu, 26 Mar 2009 21:05:51 +0000 (+0100) Subject: Fixed menu highlighting. X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=78f68ecbbb1990738a6a5ea09a714c1780f8bb32;p=ipfire.org.git Fixed menu highlighting. --- diff --git a/www/web/__init__.py b/www/web/__init__.py index 728ea2f1..ecd992fa 100644 --- a/www/web/__init__.py +++ b/www/web/__init__.py @@ -115,8 +115,8 @@ class Menu(Json): if item["uri"].startswith("/"): item["uri"] = "/%s%s" % (self.lang, item["uri"],) - #if item["uri"].find(os.environ["SCRIPT_NAME"]): - # item["active"] = "class=\"active\"" + if os.environ["REQUEST_URI"].endswith(item["uri"]): + item["active"] = "class=\"active\"" s += """
  • %(name)s
  • \n""" % item s += ""