[Moin-user] Customize navi_bar per group?

R.Bauer rb.proj at gmail.com
Thu Oct 9 03:21:32 EDT 2008


Steve Lianoglou schrieb:
> Hi Reimar,
> 
> R.Bauer <rb.proj <at> gmail.com> writes:
> 
>> You mean you want to add a different navibar dependent on member of a group?
> 
> Yeah, that's what I was wondering.
> 
>> If so the answer is no - not implemented yet.
> 
> Got it, thanks.
> 
>> But it is not difficult to do this. If you look into the theme navibar
>> code it looks like:
>>
>> # Process config navi_bar
>>         if request.cfg.navi_bar:
>>             for text in request.cfg.navi_bar:
>>                 pagename, link = self.splitNavilink(text)
>>                 if pagename == current:
>>                     cls = 'wikilink current'
>>                 else:
>>                     cls = 'wikilink'
>>                 items.append(item % (cls, link))
>>                 found[pagename] = 1
>>
>> You can add there another requirement, something like this:
>> (or you extend the user object by a method which get's the dependent
>> entries)
>>
>> pagename = u'WhateverGroup'
>> user_group = wikidicts.Group(request, pagename)
>> members = user_group.members()
>> if request.user.name in members:
>> ....
>>
>> lot's of examples at:
>> http://moinmo.in/MoinAPI/Beispiele
> 
> Thanks for the detailed info and link (though my German is a bit ... rusty :-)

you can try googles translation

http://translate.google.com/translate?u=http%3A%2F%2Fmoinmo.in%2FMoinAPI%2FBeispiele&hl=de&ie=UTF-8&sl=de&tl=en


cheers
Reimar

> 
> Most likely, I'll let the user's just deal with it how it is now. Although
> it'd be fun to dig in and make this happen, it's pretty low priority atm
> (and apparently everyone else -- for pretty good reason).
> 
> Cheers,
> -steve
> 
> 
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/





More information about the Moin-user mailing list