Possibility to return some additional navibar links by a function in theme class

I'm writing a page that tries to look almost like a regular page to users that are not logged in, and shows its real wiki nature after user has been logged in. I was able to create a special theme, that hides all wiki-related elements for all users that don't have user.name set. However, I tried to show different navibar for those users that are logged in and for the rest. For logged users I want to add HelpContents, RecentChanges and FindPage links. Unfortunately the navibar method in ThemeBase is rather large, and I don't want to copy and modify it in the theme. It would be way more elegant, if this navibar() method while creating links for navibar from different sources (global settings, users' own links, etc.) called some other method that would return just a list of those optional links (or empty list).

Or, even better, if the 'navibar' method would be split into several smaller methods - main navibar, that would construct the list of all the links to be used (by calling separate theme methods: globalQuickLinks, userQuickLinks, sisterQucikLinks (or sth), optionalQuickLinks, whatever else), removed duplicates, and produced html code. Than, by overriding any of those methods it would be easy (and elegant!) to have better control over quicklinks :)

I can create a patch for that, if people think this is a good idea ;)

Btw, right now I just have a quicklinks_default set in config file, but this also adds those links for users that are not logged in. So I just clear user.quicklinks in the theme class just before navibar is called (if the user is not logged in). This doesn't involve many changes, but is not elegant...


CategoryFeatureRequest

MoinMoin: FeatureRequests/OptionalNavibarLinksReturnedByThemeFunction (last edited 2009-03-06 00:55:30 by ThomasWaldmann)