Tags:
create new tag
view all tags

SID-00258: generate list of webs

Status: Answered Answered TWiki version: 4.1.1 Perl version:
Category: Server OS: Last update: 16 years ago

Hello, To generate a bulleted list of webs, I have:

 %WEBLIST{" * [[$name.WebHome]]"}% 

But what I want is to create a simple list of webs with the coloured squares next to them, like this TWiki has (Blog, Codev, Main, Plugins, etc.)

Thanks!

-- JenTsien - 2009-04-09

Discussion and Answer

If you go to WebLeftBar, you'll see that it's an include of TWiki.WebLeftBarWebsList, which does this (rendered):

I don't know how the bullets are removed there though. So I've had to fake it out like so:
TWiki

-- SeanCMorgan - 2009-04-09

I think the bullets are removed by the property list-style-type:none; in the class patternLeftBarContents defined on style.css (in TWiki site it is in http://twiki.org/p/pub/TWiki04x03/TWikiNetSkin/style.css in your installation it may be somewhere else). This property is applied If you insert the WEBLIST code in a WebLeftBar topic.

#patternLeftBarContents ul {
list-style-image:none;
list-style-position:outside;
list-style-type:none;
}

So if you redefine ul tag before inserting the WEBLIST code you can remove the bullets even inside a topic. Like this.

The raw code is this

<style type="text/css" media="all">
ul {
list-style-image:none;
list-style-position:outside;
list-style-type:none;
}
</style>
%WEBLIST{"   * <a href=\"%SCRIPTURL%/view%SCRIPTSUFFIX%/$name/%HOMETOPIC%\"><span style=\"background-color: %$markerVAR{\"WEBBGCOLOR\" web=$qname}$marker%\">&nbsp;&nbsp;</span>&nbsp;<b>$name</b></a>"}%
-- EnriqueCadalso - 2009-04-09

Combining Sean's and Enrique's ideas, I now have:

<style type="text/css" media="all">
ul {
list-style-image:none;
list-style-position:outside;
list-style-type:none;
}
</style>
%WEBLIST{"   * <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>"}%

Thanks for your help!

(sorry, I accidentally changed their code in some way....)

-- JenTsien - 2009-04-14

      Change status to:
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.
SupportForm
Status Answered
Title generate list of webs
SupportCategory

TWiki version 4.1.1
Server OS

Web server

Perl version

Edit | Attach | Watch | Print version | History: r6 < r5 < r4 < r3 < r2 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r6 - 2009-04-15 - JenTsien
 
  • 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.