diff MoinMoin/themes/__init__.py @ 150:d3deda1731fb

configure navi_bar using tuples saves us from first having to parse to stuff - faster it is also more flexible as one can easily link to any endpoint with any params move the global views from item_views to default navi_bar remove now wrong navi_bar docs
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 20 Mar 2011 22:06:11 +0100
parents 751ebb4ff42b
children e8f61cbd661b
line wrap: on
line diff
--- a/MoinMoin/themes/__init__.py	Sun Mar 20 20:32:30 2011 +0100
+++ b/MoinMoin/themes/__init__.py	Sun Mar 20 22:06:11 2011 +0100
@@ -204,13 +204,10 @@
         :returns: list of tuples (css_class, url, link_text, title)
         """
         flaskg.clock.start('navibar')
-        items = []  # navibar items
         current = item_name
-
         # Process config navi_bar
-        for text in self.cfg.navi_bar:
-            url, link_text, title = self.split_navilink(text)
-            items.append(('wikilink', url, link_text, title))
+        items = [(cls, url_for(endpoint, **args), link_text, title)
+                 for cls, endpoint, args, link_text, title in self.cfg.navi_bar]
 
         # Add user links to wiki links.
         userlinks = self.user.getQuickLinks()