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

%FLEXWEBLIST%
%FLEXWEBLIST%

Influencing order

%FLEXWEBLIST{webs="%USERSWEB%,public,%SYSTEMWEB%"}%
%FLEXWEBLIST{webs="Main,public,System"}%

Controlling subwebs

No subwebs

%FLEXWEBLIST{subwebs="none"}%
%FLEXWEBLIST{subwebs="none"}%

Only subwebs

%FLEXWEBLIST{subwebs="only"}%
%FLEXWEBLIST{subwebs="only"}%

Subwebs of "Sandbox"

%FLEXWEBLIST{subwebs="Sandbox"}%
%FLEXWEBLIST{subwebs="Sandbox"}%

Using include and exclude

Exclude TestCases and Trash webs

%FLEXWEBLIST{exclude="(TestCases|Trash).*" subwebs="none"}%
%FLEXWEBLIST{exclude="(TestCases|Trash).*" subwebs="none"}%

Include Sandbox web and all of its subwebs

%FLEXWEBLIST{include="Sandbox(/\w+)?"}%
%FLEXWEBLIST{include="Sandbox(/\w+)?"}%

Creating lists

Simple nested list

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

Nested list using HTML

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

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"
}%
%FLEXWEBLIST{ exclude="(TestCases|Trash).*" subwebs="none" selection="Applications" format="$indent * $name$n" markerformat="$percntFLEXWEBLIST{ include=\"^$web.*\" format=\"$dollarindent * $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>" 
}%
%FLEXWEBLIST{ header="
  • " format=" $percntTWISTY{ link=\"$name $percntIF{\"$nrsubwebs > 0\" then=\"($nrsubwebs)\"}$percnt\" }$percnt" separator="$percntENDTWISTY$percnt
  • " footer="
" }%

Sitemap

%FLEXWEBLIST{ webs="Main,public,System" header="
" format="
$name $percntVAR{\"WEBSUMMARY\" web=\"$web\"}$percnt
" footer="
" }%

Mapping names

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

Marking a selection

Using marker

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

Using markerformat

%FLEXWEBLIST{
   exclude="(TestCases|Trash).*"
   format="$indent   * [[$web.%HOMETOPIC%][$name]]$n"
   markerformat="$indent   * 
     [[$web.%HOMETOPIC%][<span class=\"foswikiAlert\">$name</span>]]$n"
   selection="%BASEWEB%"
}%
%FLEXWEBLIST{ exclude="(TestCases|Trash).*" format="$indent * $name$n" markerformat="$indent * $name$n" selection="System" }%
Topic revision: r1 - 29 May 2009, ProjectContributor
 
This site is powered by FoswikiCopyright © CC-BY-SA by the contributing authors. All material on this collaboration platform is copyrighted under CC-BY-SA by the contributing authors unless otherwise noted.
Ideas, requests, problems regarding Foswiki? Send feedback