Question
I have a list, stored in a variable. It is like "Web1.Topic, Web2.Topic" - i.e. both topics have the same name. Can I use
RenderListPlugin for this? (I want it to show the web names).
If not, is there anything you can suggest? Thanks.
Environment
--
MartinCleaver - 02 Mar 2004
Answer
I don't exactly understand your question. Stored in what kind of variable? Do you want to convert the comma delimited list into bullets, to be rendered by this Plugin? In this case you can use a $SUBSTITUTE() to replace all ", " into bullets.
--
PeterThoeny - 04 Mar 2004
Ok, I know understand (from
http://koala.ilog.fr/twikiirc/bin/irclogger_log/twiki?date=2004-03-04,Thu&sel=34#l30
) what the difference between the variable types are. I mean a variable defined in
TWikiPreferences.
I appreciate my question was unclear. I want to render a variable WEBCALS = "Web1.Topic, Web2.Topic" so that each element of the variable is rendered including the web name.
http://koala.ilog.fr/twikiirc/bin/irclogger_log/twiki?date=2004-03-02,Tue&sel=10#l6
has an example.
Can
RenderListPlugin help me there?
Thanks, M.
--
MartinCleaver - 04 Mar 2004
(question moved to here from
Plugins.RenderListPluginDev)
Oh, I see. If you write
Web.TopicName you will get a link text of just
TopicName. To show also the name of the web, write
[[Web.TopicName]]. Use
SpreadSheetPlugin's
$SUBSTITUTE() function to convert all
Web.TopicNames in a list into the square bracket links. Unfortunately commas are not supported. Here is an example with + delimited topics: (the example escapes the double brackets with
<nop> so that you can see the result; remove the escape when using it)
- Set TESTVAR1 = Web1.Topic1+Web2.Topic2+Web3.Topic3
- You type:
%CALC{[[$SUBSTITUTE(%TESTVAR1%,+,]] [[)]]}%
- You get: [[Web1.Topic1]] [[Web2.Topic2]] [[Web3.Topic3]]
You can go fancy and nest some functions to convert a comma separated list: (first translate the comma into semicolon, then substitue, then convert semicolon back to comma)
- Set TESTVAR2 = Web1.Topic1, Web2.Topic2, Web3.Topic3
- You type:
%CALC{[[$TRANSLATE($SUBSTITUTE($TRANSLATE(%TESTVAR2%,$comma,;),; ,]]; [[),;,$comma,)]]}%
- You get: [[Web1.Topic1]], [[Web2.Topic2]], [[Web3.Topic3]]
--
PeterThoeny - 04 Mar 2004
Thanks Peter. I guess that spreadsheet plugin really has a much broader scope than spreadsheets.
It is a shame about the non-support for commas - the workaround really makes the expression ugly and unintuitive for a new administrator, especially if I had to use it more than once. Hence, I'm hestitant to use your solution as I am sure it would just freak out whoever took over the web.
--
MartinCleaver - 05 Mar 2004
You could contribute a
$FUNC("parser", "with", "parameters in double quotes") if you want commas retained in text
--
PeterThoeny - 05 Mar 2004