Tags:
create new tag
, view all tags

Question

I have made 2 different LeftBars containing different page liks. I want to create an if statement to decide which LeftBar should be shown depending on which TWikiGroup the user belongs to. How do I write the syntax for this? I have tried different expressions similar to the following:

%INCLUDE{"%IF{ "$ TWIKIGROUPS='GroupName' then="%TWikiWebName%.WebLeftBarGroupa" else="%TWikiWebName%.WebLeftBarGroupb" }%

Environment

TWiki version: TWikiRelease04x00x04
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS:  
Web server:  
Perl version:  
Client OS:  
Web Browser:  
Categories: Permissions, Authentication, Security

-- LinaMattsson - 04 Aug 2006

Answer

ALERT! If you answer a question - or have a question you asked answered by someone - please remember to edit the page and set the status to answered. The status is in a drop-down list below the edit box.

Since TWiki 4.2 you can use this:

%IF{"'%USERNAME%' ingroup 'TWikiAdminGroup'" then="$percntINCLUDE{$quotMain.AdminLinks$quot}$percnt"}%

-- ArthurClemens - 08 Mar 2008

 
Topic revision: r3 - 2008-03-08 - ArthurClemens
 
Twitter Delicious Facebook Digg Google Bookmarks E-mail LinkedIn Reddit StumbleUpon    
  • Download TWiki
TWiki logo Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2012 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.