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 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 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:
Edit | Attach | Watch | Print version | History: r6 < r5 < r4 < r3 < r2 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r6 - 2008-08-17 - PeterThoeny
 
  • 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.