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

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:
Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r5 - 2007-02-11 - MichaelDaum
 
  • 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.