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.

No params (almost)

%FLEXWEBLIST{separator=", " subheader=", "}%
Applications, Applications.BlogApp, Applications.ClassificationApp, Argumente, Blog, Cyberhome, Digital, FLEXWEBLIST{format="$web=WebHome","}, Fachgruppe, Journalclub, Main, Mundi, Sandbox, System, Wiki

Influencing order

%FLEXWEBLIST{webs="%USERSWEB%,public,%SYSTEMWEB%" separator=", " subheader=", "}%
Main, Applications, Applications.BlogApp, Applications.ClassificationApp, Argumente, Blog, Cyberhome, Digital, FLEXWEBLIST{format="$web=WebHome","}, Fachgruppe, Journalclub, Mundi, Sandbox, System, Wiki

Controlling subwebs

No subwebs

%FLEXWEBLIST{subwebs="none" separator=", " subheader=", "}%
Applications, Argumente, Blog, Cyberhome, Digital, Fachgruppe, Journalclub, Main, Mundi, Sandbox, System, Wiki

Only subwebs

%FLEXWEBLIST{subwebs="only" separator=", " subheader=", "}%
, Applications.BlogApp, Applications.ClassificationApp, FLEXWEBLIST{format="$web=WebHome","}

Subwebs of "Sandbox"

%FLEXWEBLIST{subwebs="Sandbox" separator=", " subheader=", "}%

Using include and exclude

Exclude TestCases and Trash webs

%FLEXWEBLIST{exclude="(TestCases|Trash).*" subwebs="none" separator=", " subheader=", "}%
Applications, Argumente, Blog, Cyberhome, Digital, Fachgruppe, Journalclub, Main, Mundi, Sandbox, System, Wiki

Include Sandbox web and all of its subwebs

%FLEXWEBLIST{include="Sandbox(\.\w+)?" separator=", " subheader=", "}%
Sandbox

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="Applications"
   format="$indent   * [[$web.%HOMETOPIC%][$name]]$n"
   markerformat="$percntFLEXWEBLIST{
     include=\"^$web.*\"
     format=\"$dollarindent   * [[$dollarweb.%HOMETOPIC%][$dollarname]]$dollarn\"
   }$percnt"
}%

Twisty weblist

needs the Foswiki:Extensions/TwistyPlugin
%FLEXWEBLIST{
   header="<ul><li>" 
   format="
     $percntTWISTY{
       link=\"$name $percntIF{\"$nrsubwebs > 0\" then=\"($nrsubwebs)\"}$percnt\"
     }$percnt"
   separator="$percntENDTWISTY$percnt</li><li>"
   footer="</li></ul>" 
}%

Sitemap

Applications Applications Library
BlogApp Blogging application for Foswiki
ClassificationApp Categorization and folksomony application
Argumente Argumente gegen das Digitale in der Schule
Blog Beat Döbelis Weblog
Cyberhome Discover the details, and how to start your own site with Foswiki - The Free and Open Source Wiki.
Digital Website zum Buch "Mehr als 0 und 1: Schule in einer digitalsierten Welt"
Journalclub Arbeitsgruppe Medien und Informatik
Main Welcome to arbeitsgruppe.ch … meet people on this site
Mundi Arbeitsgruppe Medien und Informatik
Sandbox Sandbox test area to experiment in an unrestricted hands-on web.
System Discover the details, and how to start your own site with Foswiki - The Free and Open Source Wiki.
Wiki Wiki zum Buch "Der Wiki-Weg des Lernens"

Mapping names

%FLEXWEBLIST{
    map="TestCases=Tests,%SYSTEMWEB%=Documentation,%USERSWEB%=Users"
    format="$indent   * [[$web.%HOMETOPIC%][$name]]$n"
}%

Marking a selection

Using marker

%FLEXWEBLIST{
   exclude="(TestCases|Trash).*"
   format="$indent   * <span class=\"$marker\"> $web </span>$n"
   marker="foswikiAlert"
   selection="%BASEWEB%"
}%
  • Applications
    • Applications.BlogApp
    • Applications.ClassificationApp
  • Argumente
  • Blog
  • Cyberhome
  • Digital
    • FLEXWEBLIST{format="$web=WebHome","}
  • Fachgruppe
  • Journalclub
  • Main
  • Mundi
  • Sandbox
  • System
  • Wiki

Using markerformat

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