]> git.ipfire.org Git - ipfire.org.git/commitdiff
Fixed menu highlighting.
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 26 Mar 2009 21:05:51 +0000 (22:05 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 26 Mar 2009 21:05:51 +0000 (22:05 +0100)
www/web/__init__.py

index 728ea2f1342d82db0cd0c029a011a1091c698d1d..ecd992fa01a8a25c266c3ca9364cea27424f8707 100644 (file)
@@ -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 += """<li><a href="%(uri)s" %(active)s>%(name)s</a></li>\n""" % item
                s += "</ul></div>"