SID-00258: generate list of webs
| Status: |
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%\"> </span> <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%\" /> $indentedname</a>"}%
Thanks for your help!
(sorry, I accidentally changed their code in some way....)
--
JenTsien - 2009-04-14
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.