Tags:
create new tag
, view all tags

Question

I have a few top level webs, like "Products", "Projects", etc. Some of these have subwebs. As there could be a lot of subwebs for projects for example, the list of webs could get too big. I would like to display only the top level webs in the web left bar, but can't figure out how to do so without hard coding it.

eg.

%WEBLIST{"   * <span style=\"white-space:nowrap\"><a href=\"%SCRIPTURLPATH{"view"}%/$name/%HOMETOPIC%\"><img src=\"%ICONURL{web-bg}%\" border=\"0\" alt=\"\" width=\"16\" height=\"16\" style=\"background-color:%$markerVAR{\"WEBBGCOLOR\" web=$qname}$marker%" />&nbsp;$indentedname</a></span>" webs="Products, Projects,Main,Twiki,Sandbox,Thrash"}%

NB. On the WebHome page for the top level webs which have subwebs I will display the subwebs as follows so that they are not needed in the left bar:

%WEBLIST{"   * [[$name.WebHome][$indentedname]]" subwebs="%WEB%"}%

PS. I had trouble on formatting the first example above! Can't get it so that the text wraps.

Environment

TWiki version: TWikiRelease04x02x00
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: sun4-solaris
Web server: Apache httpd-2.2.8
Perl version: Perl v5.8.2
Client OS: Windows XP SP2
Web Browser: Internet Explorer v6
Categories: Search

-- TWikiGuest - 23 Jun 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 RegularExpressionsInIFstatement

-- SeanCMorgan - 23 Jul 2008

 
Change status to:
Topic revision: r2 - 2008-07-23 - SeanCMorgan
 
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.