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
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 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.

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 | Attach | (削除) Watch (削除ここまで) | Print version | History : r7 < r6 < r5 < r4 < r3 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r7 - 2008年05月04日 - WillBerger
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.

AltStyle によって変換されたページ (->オリジナル) /