From e90000545b505c62ceabce3db69b8a150f94b0e9 Mon Sep 17 00:00:00 2001 From: Massimo Date: Fri, 18 Jan 2013 09:09:21 -0600 Subject: [PATCH] highligthing wiki menu items, 1290, thanks Paolo --- VERSION | 2 +- gluon/tools.py | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index 41ce4266..3ba35bcf 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.4.1-alpha.2+timestamp.2013.01.18.09.04.49 +Version 2.4.1-alpha.2+timestamp.2013.01.18.09.08.52 diff --git a/gluon/tools.py b/gluon/tools.py index b114c189..935828c0 100644 --- a/gluon/tools.py +++ b/gluon/tools.py @@ -5153,15 +5153,19 @@ class Wiki(object): base = match.group('base').replace(' ', '') title = match.group('title') link = match.group('link') + title_page = None if link.startswith('@'): items = link[2:].split('/') if len(items) > 3: + title_page = items[3] link = URL(a=items[0] or None, c=items[1] or None, f=items[2] or None, args=items[3:]) parent = tree.get(base[1:], tree['']) subtree = [] tree[base] = subtree - parent.append((current.T(title), False, link, subtree)) + parent.append((current.T(title), + request.args(0) == title_page, + link, subtree)) if self.can_see_menu(): submenu = [] menu.append((current.T('[Wiki]'), None, None, submenu))