r7 - 04 May 2008 - 02:12:20 - WillBergerYou are here: TWiki >  Support Web > WebLeftBarContentAccessControl
Tags:
, create new tag

Question

in The WebLeftBar Topic I am trying to control what content is displayed depending on who is logged in.

In this case display the "Statistics" topic if you are not "TWikiGuest".

%IF{ "$ WIKINAME!='TWikiGuest' " then="   * [[WebStatistics][ %ICON{"statistics"}% %MAKETEXT{"Statistics"}%]]" else "No web stats" }%
Can anyone tell me why this does not work? Or have a recommendation on how to accomplish this. Any help much appreciated.

Environment

TWiki version: TWikiRelease04x02x00
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: centos5
Web server: apache
Perl version:  
Client OS:  
Web Browser:  
Categories: Permissions
-- WillBerger - 03 May 2008

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.

Try %IF{ "'$ WIKINAME'!='TWikiGuest' "

-- ArthurClemens - 03 May 2008

Thanks for the suggestion...Did not help.

-- WillBerger - 03 May 2008

This one works:

%IF{ "$WIKINAME!='TWikiGuest' " then="   * [[WebStatistics][%MAKETEXT{"Statistics"}%]]" else="No web stats" }%

-- ArthurClemens - 03 May 2008

Yes. Thanks, I wonder why the ICON function breaks it.

%IF{ "$WIKINAME!='TWikiGuest' " then="   * [[WebStatistics][  %ICON{"statistics"}% %MAKETEXT{"Statistics"}%]]" else="" }%

-- WillBerger - 03 May 2008

Because of the quotes.

-- ArthurClemens - 03 May 2008

Anyway to escape this or get around it?

-- WillBerger - 04 May 2008

Finally got it to work!

%IF{ "$WIKINAME!='TWikiGuest' " then="   * [[WebStatistics][ %ICONURL{"statistics"}% %MAKETEXT{"Statistics"}%]]" else="" }%

Arthur thanks for all the help!

-- WillBerger - 04 May 2008

 
Change status to:
Edit | WYSIWYG | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r7 < r6 < r5 < r4 < r3 | More topic actions
 
Powered by TWiki
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback SourceForge.net Logo