This solves in part
Bugs:Item2242
,
Bugs:Item2240
,
Bugs:Item2566
.
--
MichaelDaum - 26 Jul 2006
Thanks Micha for sharing this Plugin with the community!
Is this Plugin upward compatible with WEBLIST? Does it make sense to merge the changes into WEBLIST?
How about measuring and documenting the
PluginBenchmarks numbers?
--
PeterThoeny - 26 Jul 2006
It
nearly is a drop-in replacement for WEBLIST. But there are some small differences, like the
$marker string
not defaulting to
selected="selected" and some other defaults of WEBLIST that are mainly targetted at making
it part of a
<select>, afaics. In addition FLEXWEBLIST is meant to work on cairo and beijing too by not making use
of any dakar specifics and adding a special wrapper function to get the list of webs on all three platforms that
levels their differences. Sure, cairo and beijing are not hierarchical. Nevertheless, this plugin should not
sneak in a hard dakar dependency as the next
NatSkin will depend on the
FlexWebListPlugin while getting
rid of the
FilterPlugin dependency. For now,
NatSki will still continue to support all three platforms. I am
not ready yet to de-cruft it.
Integrating the
FlexWebListPlugin into the core to replace the current WEBLIST implementation would result in some internal apis to
be extended/cleaned up, i.e. fetching a
structured weblist.
FlexWebListPlugin computes that on its own by
computing the parten-child relationships by parsing their name, which is not the right way to do it inside the core.
--
MichaelDaum - 27 Jul 2006
I have been trying to add the navigation feature to the standard %WEBLIST% in
TWiki.WebLeftBarWebsList for PatternSkin, and I am using something like this:
%FLEXWEBLIST{webs="%MAINWEB%,public,%TWIKIWEB%" exclude="TestCases|Trash.*" header="<ul>" format="<li><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%\" />$name</a> $percntIFDEFINEDTHEN{\"$nrsubwebs \" as=\"0 \"}$percnt $percntELSEDEFINED$percnt $percntTWISTYBUTTON{id=\"sitemap_$web\" buttonmode=\"span\" showimg=\"$percntICONURLPATH{\"toggleopenleft\"}$percnt\" hideimg=\"$percntICONURLPATH{\"toggleclose\"}$percnt\" }$percnt $percntFIDEFINED$percnt" subformat="<li class=\"nobr\">$indent( )<a href=\"%SCRIPTURLPATH{"view"}%/$web/%HOMETOPIC%\"><img src=\"%ICONURL{web-bg}%\" border=\"0\" alt=\"\" width=\"16\" height=\"16\" style=\"background-color:%$markerVAR{\"WEBBGCOLOR\" web=$qname}$marker%\" />$name</a> $percntIFDEFINEDTHEN{\"$nrsubwebs \" as=\"0 \"}$percnt $percntELSEDEFINED$percnt $percntTWISTYBUTTON{id=\"sitemap_$web\" buttonmode=\"span\" showimg=\"$percntICONURLPATH{\"toggleopenleft\"}$percnt\" hideimg=\"$percntICONURLPATH{\"toggleclose\"}$percnt\" }$percnt $percntFIDEFINED$percnt" separator="</li>$n" subseparator="</nobr></li>$n" subheader="$percntTWISTYTOGGLE{id=\"sitemap_$web\" mode=\"div\" remember=\"on\"}$percnt<ul>" subfooter="</li></ul>$percntENDTWISTY$percnt" footer="</ul>"}%
However, I would like the
$indent "counter" work somewhat differently. As it is now, when the first subweb level gets displayed, I will get 6
. Perhaps it could be changed so this was configurable in some way?
For now I use
as the indent marker in
subformat, but I still get "too many" - using the "correct" twikindent span for the weblist is of simply too much as it is multiplied by 6 when only one is needed.
Btw: Long webnames are breaking up at times, added a
.nobr { white-space: nowrap; }
to css and used it for the
li element as shown in the tag.
--
SteffenPoulsen - 01 Aug 2006
Oh I see. Fixed in v0.05. Give it a try.
--
MichaelDaum - 02 Aug 2006
Thanks, much better now
.. but: Index is counting from 1 as is, meaning format indents at least 2x in a subformat. Any way to make it start from 0?
relindex="-1" ?
--
SteffenPoulsen - 02 Aug 2006
Oh I see. Fixed in v0.07 which starts counting
$indent at zero now,
that is: level 0 ... zero indentation, level 1 ... one indentation etc.
--
MichaelDaum - 03 Aug 2006
The
[[%ATTACHURL%/%TOPIC%.zip][Download]] link fails if this Plugin is installed; it works only here on TWiki.org. Better to write the full URL
[[http://twiki.org/p/pub/Plugins/%TOPIC%/%TOPIC%.zip][Download]]. Actually I think it is better to keep the original text
"Download the ZIP file from the Plugin web (see below)" (and fix the viewfile issue on TWiki.org.)
--
PeterThoeny - 05 Aug 2006
I think
$nop does not work it seems like
$n is getting in the way.
--
StephaneLenclud - 10 Mar 2007
Fixed.
--
MichaelDaum - 10 Mar 2007
The plugin topic does not list all the options and all the values.
- subweb is not mentioned. I found it by chance by looking at the example topic.
- values like "none", "all", "only" are not documented. You have to look at the code to know they are there. For example "none" can be used in separator
Finally I miss a feature that I really need. Maybe it is there but not documented?
I need to show a list of all top level webs AND the subwebs of the current web only. The idea is to use this in the left bar so when you navigate from web to web you only see subwebs of the current web. If you are in a subweb you need to still see all the other subwebs below the parent top level web.
I need this because the list of webs is already long and as people add subwebs the left bar becomes too long and complicated and noisy.
If the plugin cannot do this - then please consider it a wish.
--
KennethLavrsen - 27 Mar 2007
Here's how to list all top level webs (using
GluePlugin syntax but I think you get it anyway):
%~~ FLEXWEBLIST{
~~~ webs="%MAINWEB%,User,publiccurrent,%TWIKIWEB%"
~~~ include="\w+"
~~~ header="<ul>"
~~~ format="<li>[[$web.WebHome][$name]]</li>"
~~~ footer="</ul>"
~~~ separator="$n"
~~~ }%
Here's how to list all top level and their next subweb level:
%~~ FLEXWEBLIST{
~~~ webs="%MAINWEB%,User,publiccurrent,%TWIKIWEB%"
~~~ include="\w+"
~~~ header="<ul>"
~~~ format="<li>[[$web.WebHome][$name]]
~~~ $percntFLEXWEBLIST{
~~~ include=\"$web/\w+\"
~~~ header=\"<ul>\"
~~~ format=\"<li>[[$dollarweb.WebHome][$dollarname]]</li>\"
~~~ footer=\"</ul>\"
~~~ }$percnt
~~~ </li>"
~~~ footer="</ul>"
~~~ separator="$n"
~~~ }%
The trick is to have
include="\w+" for filter out all webs that have a non-alphabetic char (like a
/) in their name. If you have some
special top level webs with non-alphabetic chars in their name you have to adjust this regular expression. Same for filtering out anything but
the current subwebs. Just make use of the
include and
exclude parameters and be creative wrt their regular expression.
--
MichaelDaum - 28 Mar 2007
I think I've found a bug.
The following gives me a set of indented webs and subwebs, as expected:
%~~ FLEXWEBLIST{
~~~ format="$indent * <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%\" />
~~~ [[$web.%HOMETOPIC%][$name]]</a>
~~~ </span>$n"
~~~ exclude="Shared|Trash.*"
~~~ }%
- Screenshot of web/subweb hierarchy:
But when I use
include to show only the current web and its subwebs, the result is not indented
%~~ FLEXWEBLIST{
~~~ format="$indent * <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%\" />
~~~ [[$web.%HOMETOPIC%][$name]]</a>
~~~ </span>$n"
~~~ include="%INCLUDINGWEB%(/\w+)?"
~~~ }%
- screenshot of current web hierarchy:
--
VickiBrown - 11 Dec 2007
Is it possible to define a specific web list for
TWikiGuest ?
--
KeithHelfrich - 31 Jan 2008
The map parameter does not work for the code that is in
TWikiWebButtons. It seems like $default is the problem. $name is mapped but not highlighted while $default is highlighted but not mapped
--
CarloSchulz - 16 Apr 2008
I just installed this plugin using configure and the installer also installs
GluePlugin. Is this a bug in the installer? The plugin topic says nothing about a dependency of glueplugin and I honestly do not want
GluePlugin installed.
--
KennethLavrsen - 20 May 2008
I don't know if there is a bug in the installer. I checked the DEPENDENCIES file and it list the
GluePlugin as "Recomended", but apparently for
BuildContrib that is just part of the description (according to the documentation).
--
RafaelAlvarez - 20 May 2008
Most of the examples
FlexWebListPlugin comes with would be non-readable without
GluePlugin. That's why it is
recommended. Not sure why
BuildContrib insists in installing recommended plugins. I guess even flagging dependencies as "optional" will install them.
--
MichaelDaum - 21 May 2008
I'll rephrase what I said:
I don't know if there is a bug in the installer (by not recognizing the "Recomended" tag) or if there is an error in the documentation of
BuildContrib, where I got the idea that something can be marked as "Recomended", but is not explicitly stated.
--
RafaelAlvarez - 21 May 2008
I changed the
ModificationPolicy of this extension from
ContactAuthorFirst to
PleaseFeelFreeToModify due to inactivity. Anyone please feel free to work on this extension.
--
PeterThoeny - 2012-12-03