Question
Hello,
i need a way to split the %WEBLIST% variable.
i have a hierarchical twiki and i want only the root or first web (not subwebs)
i found this way:
%WEBLIST{"...", separator=".."}%
but i did not find an option like "match"
for example:
%WEBLIST{"[[$name][$name]]", match="^[^/\.]+$"}%
an other not working way:
%IF{"%WEBLIST% = /^([^/\.]+)$/" then="$1"}%
is there any other way to get the required result?
Thank you
Environment
--
RicardoDonner - 22 Jul 2008
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.
I don't have subwebs to test this on, but here (view raw) is a WEBLIST with a regex exclude, so it should work (but instead of 'Trash', search for '\', or maybe escaped as '\\').
All EXCEPT Trash web: Blog, Codev, Main, Plugins, Sandbox, Support, TWiki, TWiki01, TWiki02, TWiki03, TWiki04, TWiki04x01, TWiki04x02, TWiki04x03, TWiki05x00, TWiki05x01, TWiki06x00, TWiki06x01,
WikiWed
Or as bullets:
- Blog
- Codev
- Main
- Plugins
- Sandbox
- Support
- TWiki
- TWiki01
- TWiki02
- TWiki03
- TWiki04
- TWiki04x01
- TWiki04x02
- TWiki04x03
- TWiki05x00
- TWiki05x01
- TWiki06x00
- TWiki06x01
- WikiWed
P.S. I am changing the status to Answered. Please undo that if you need more assistance.
P.P.S. a 'twofer'?: same question as
DisplayTopLevelWebsOnly
--
SeanCMorgan - 23 Jul 2008
Hello,
it's not the best way and it will not work for me
a
RegularExpression direct in %WEBLIST% or %TOPICLIST% will be the best way :-(.
Now i need to write a plugin to get the required result
--
RicardoDonner - 15 Aug 2008
I'd recommend you have a look at
FlexWebListPlugin.
--
LynnwoodBrown - 15 Aug 2008