Tags:
create new tag
, view all tags

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" frown

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

TWiki version: TWikiRelease04x02x00
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: SuSE Linux 10
Web server: Apache 2
Perl version: Perl 5
Client OS: XP
Web Browser: IE6
Categories: Platform, Forms, Missing functionality, Documentation

-- RicardoDonner - 22 Jul 2008

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.

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

Or as bullets:

  • Blog
  • Codev
  • Main
  • Plugins
  • Sandbox
  • Support
  • TWiki
  • TWiki01
  • TWiki02
  • TWiki03
  • TWiki04
  • TWiki04x01
  • TWiki04x02
  • TWiki04x03
  • TWiki05x00
  • TWiki05x01

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 frown

a RegularExpression direct in %WEBLIST% or %TOPICLIST% will be the best way :-(. Now i need to write a plugin to get the required result frown

-- RicardoDonner - 15 Aug 2008

I'd recommend you have a look at FlexWebListPlugin.

-- LynnwoodBrown - 15 Aug 2008

 
Change status to:
Topic revision: r6 - 2008-08-17 - PeterThoeny
 
Twitter Delicious Facebook Digg Google Bookmarks E-mail LinkedIn Reddit StumbleUpon    
  • Download TWiki
TWiki logo Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2012 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.