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 someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is 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

Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r3 - 2008-03-08 - ArthurClemens
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.