Tags:
create new tag
, view all tags

Question

Consider the following in NameOfWeb.WebLinks

   * %ICON{home}% [[WebHome][Home]]
   * %ICON{changes}% [[WebChanges][Latest]]

Simple and easy. But it complicates matters when only authenticated users/groups can see a particular set of menus.

%IFDEFINED{ "Main.SomeGroup" glue="off" then="   * %ICON{wrench}% [[WebPreferences][Settings]]"}

It looks fine. But it parses out as

<img width=

I tried escaping then=\" \" it didn't work either. I tried using %INCLUDE% inside of then="" didn't work. I tried...

%IFDEFINEDTHEN { "Main.SomeGroup" glue="off" }%
   * %ICON{wrench}% [[WebPreferences][Settings]]
%FIDEFINED%

But that doesn't do anything, i.e. IFDEFINEDTHEN isn't parsed. Not sure what I'm doing wrong.

FlexWebList isn't good for me. I've tried looking at how BlogPlugin does it, but I can't a way.

Just wanna know, if there is any other way to do this? Or should I just file a bug?

I would suggest to change all hardcoded HTML attributes to single quotes, shouldn't be any harm. But then I dunno what's it like in the codes.

I need suggestions to get this running.

Environment

TWiki version: TWikiRelease04x00x05
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: Debian
Web server: Apache2
Perl version: 5.8.8
Client OS:  
Web Browser:  
Categories: Platform

-- KwangErnLiew - 10 Feb 2007

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.

Please file a bug with the appropriate plugin.

-- ArthurClemens - 10 Feb 2007

The problem is that you are nesting two variables (IFDEFINED and ICON) and the nested ICON expands to a string with double quotes, which confuses the outer IFDEFINED variable. Instead of %ICON{wrench}%, write %ICONURL{wrench}%, which gives you just the URL. Make sure to have a leading and trailing space so that the image URL is inlined properly. Alternatively, put an ICONURLPATH into an img tag with single quotes.

-- PeterThoeny - 10 Feb 2007

Sweet, I've tried all the solutions in Bugs:Item3601.

The solution below (well, the spurious space) doesn't work, simply because it doesn't render <3spaces>* as a bullet point. No biggie though.

%IFDEFINEDTHEN{ "Main.SomeGroup" glue="off" }%
   * %ICON{wrench}% [[WebPreferences][Settings]]
%FIDEFINED%

%ICONURL%= and $percntICON{wrench}$percnt works perfectly.

Thanks...! big grin

-- KwangErnLiew - 10 Feb 2007

 
Change status to:
Topic revision: r5 - 11 Feb 2007 - 00:31:48 - MichaelDaum
 
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