Welcome, Registration, and other StartingPoints; TWiki history & Wiki style; All the docs...

FlexWebListExamples

These are some simple examples to show how to use the basic features of the FlexWebListPlugin. Please create some subwebs in the Sandbox web for a better illustration of the examples below. Some of the examples are displayed using the "glue" syntax of the TWiki:Plugins.GluePlugin to ease reading multiline TML expressions and arguments.

No params

%FLEXWEBLIST%
AmLegalHist? CompPrivConst? EngLegalHist? LawContempSoc? LawNetSoc? Main TWiki

Influencing order

%FLEXWEBLIST{webs="%MAINWEB%,public,%TWIKIWEB%"}%
Main AmLegalHist? CompPrivConst? EngLegalHist? LawContempSoc? LawNetSoc? TWiki

Controlling subwebs

No subwebs

%FLEXWEBLIST{subwebs="none"}%
AmLegalHist? CompPrivConst? EngLegalHist? LawContempSoc? LawNetSoc? Main TWiki

Only subwebs

%FLEXWEBLIST{subwebs="only"}%

Subwebs of "Sandbox"

%FLEXWEBLIST{subwebs="Sandbox"}%

Using include and exclude

Exclude TestCases and Trash webs

%FLEXWEBLIST{exclude="TestCases|Trash.*" subwebs="none"}%
AmLegalHist? CompPrivConst? EngLegalHist? LawContempSoc? LawNetSoc? Main TWiki

Include Sandbox web and all of its subwebs

%FLEXWEBLIST{include="Sandbox(/\w+)?"}%
AmLegalHist? CompPrivConst? EngLegalHist? LawContempSoc? LawNetSoc? Main TWiki

Creating lists

Simple nested list

%FLEXWEBLIST{format="$indent   * [[$web.%HOMETOPIC%][$name]]$n"}%

Nested list using HTML

%~~ FLEXWEBLIST{
~~~   header="<ul>" 
~~~   format="<li>[[$web.%HOMETOPIC%][$name]]" 
~~~   separator="</li>"
~~~   footer="</li></ul>" 
~~~ }%

Nested calls to FLEXWEBLIST

%~~ FLEXWEBLIST{
~~~   exclude="TestCases|Trash.*" 
~~~   subwebs="none"
~~~   selection="Sandbox"
~~~   format="$indent   * [[$web.%HOMETOPIC%][$name]]$n"
~~~   markerformat="$percntFLEXWEBLIST{
~~~     webs=\"$web\"
~~~     format=\"$dollarindent   * [[$dollarweb.%HOMETOPIC%][$dollarname]]$dollarn\"
~~~   }$percnt"
~~~ }%

Twisty weblist

needs the TWiki:Plugins/TwistyPlugin
%~~ FLEXWEBLIST{
~~~   header="<ul>" 
~~~   format="<li>
~~~     $percntTWISTYBUTTON{
~~~       id=\"twisty_weblist_$web\"
~~~       link=\"$name ($nrsubwebs)\"
~~~     }$percnt"
~~~   separator="</li>"
~~~   subheader="
~~~     $percntTWISTYTOGGLE{
~~~       id=\"twisty_weblist_$web\" 
~~~       mode=\"div\"
~~~     }$percnt<ul>" 
~~~   subfooter="</li></ul>$percntENDTWISTY$percnt" 
~~~   footer="</li></ul>" 
~~~ }%
  • AmLegalHist (0)AmLegalHist (0)
  • CompPrivConst (0)CompPrivConst (0)
  • EngLegalHist (0)EngLegalHist (0)
  • LawContempSoc (0)LawContempSoc (0)
  • LawNetSoc (0)LawNetSoc (0)
  • Main (0)Main (0)
  • TWiki (0)TWiki (0)

Twisty navigation

needs the TWiki:Plugins/TwistyPlugin and the TWiki:Plugins/IfDefinedPlugin

%~~ FLEXWEBLIST{
~~~   webs="%MAINWEB%,public,%TWIKIWEB%"
~~~   exclude="TestCases|Trash.*"
~~~   header="<ul>" 
~~~   format="<li>[[$web.%HOMETOPIC%][$name]]&nbsp;
~~~     $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"
~~~   subheader="$percntTWISTYTOGGLE{id=\"sitemap_$web\"}$percnt<ul>" 
~~~   subfooter="</li></ul>$percntENDTWISTY$percnt" 
~~~   footer="</ul>" 
~~~ }%

Sitemap

Main Welcome to Eben Moglen's Course Wiki
AmLegalHist American Legal History
CompPrivConst Computers, Privacy & the Constitution
EngLegalHist English Legal History and its Materials
LawContempSoc Law in Contemporary Society
LawNetSoc Law in the Internet Society
TWiki Welcome, Registration, and other StartingPoints; TWiki history & Wiki style; All the docs...

Mapping names

%~~ FLEXWEBLIST{
~~~    map="TestCases=Tests,%TWIKIWEB%=System,%MAINWEB%=Home"
~~~    format="$indent   * [[$web.%HOMETOPIC%][$name]]$n"
~~~ }%

Marking a selection

Using marker

%~~ FLEXWEBLIST{
~~~   exclude="TestCases|Trash.*"
~~~   format="$indent   * <span class=\"$marker\"> $web </span>$n"
~~~   marker="twikiAlert"
~~~   selection="%BASEWEB%"
~~~ }%
  • AmLegalHist?
  • CompPrivConst?
  • EngLegalHist?
  • LawContempSoc?
  • LawNetSoc?
  • Main
  • TWiki

Using markerformat

%~~ FLEXWEBLIST{
~~~   exclude="TestCases|Trash.*"
~~~   format="$indent   * [[$web.%HOMETOPIC%][$name]]$n"
~~~   markerformat="$indent   * 
~~~     [[$web.%HOMETOPIC%][<span class=\"twikiAlert\">$name</span>]]$n"
~~~   selection="%BASEWEB%"
~~~ }%

Go

Navigation

Webs Webs

r0 - 10 Mar 2007 - 07:39:57 - TWikiContributor
This site is powered by the TWiki collaboration platform.
All material on this collaboration platform is the property of the contributing authors.
All material marked as authored by Eben Moglen is available under the license terms CC-BY-SA version 4.
Syndicate this site RSSATOM