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
--
KwangErnLiew - 10 Feb 2007
Answer
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...!
--
KwangErnLiew - 10 Feb 2007