Tags:
create new tag
, view all tags

FlexWebList Examples

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%
%FLEXWEBLIST%

Influencing order

%FLEXWEBLIST{webs="%MAINWEB%,public,%TWIKIWEB%"}%
%FLEXWEBLIST{webs="Main,public,TWiki06x00"}%

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.WebHome][$name]]$n"}%
%FLEXWEBLIST{format="$indent * $name$n"}%

Nested list using HTML

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

Nested calls to FLEXWEBLIST

%~~ FLEXWEBLIST{
~~~   exclude="TestCases|Trash.*" 
~~~   subwebs="none"
~~~   selection="Sandbox"
~~~   format="$indent   * [[$web.WebHome][$name]]$n"
~~~   markerformat="$percntFLEXWEBLIST{
~~~     webs=\"$web\"
~~~     format=\"$dollarindent   * [[$dollarweb.WebHome][$dollarname]]$dollarn\"
~~~   }$percnt"
~~~ }%
%FLEXWEBLIST{exclude="TestCases|Trash.*" subwebs="none" selection="Sandbox" format="$indent * $name$n" markerformat="$percntFLEXWEBLIST{ webs=\"$web\" format=\"$dollarindent * $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>" 
~~~ }%
%FLEXWEBLIST{header="
    " format="
  • $percntTWISTYBUTTON{ id=\"twisty_weblist_$web\" link=\"$name ($nrsubwebs)\" }$percnt" separator="
  • " subheader="$percntTWISTYTOGGLE{id=\"twisty_weblist_$web\" mode=\"div\"}$percnt
      " subfooter="
    $percntENDTWISTY$percnt" footer="
"}%

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.WebHome][$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>" 
~~~ }%
%FLEXWEBLIST{webs="Main,public,TWiki06x00" exclude="TestCases|Trash.*" header="
    " format="
  • $name  $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="
  • $n" subheader="$percntTWISTYTOGGLE{id=\"sitemap_$web\" mode=\"div\"}$percnt
      " subfooter="
    $percntENDTWISTY$percnt" footer="
"}%

Sitemap

%~~ FLEXWEBLIST{ ~~~ webs="Main,public,TWiki06x00" ~~~ header="
" ~~~ format="
~~~ $name $percntVAR{\"SITEMAPWHAT\" web=\"$web\"}$percnt ~~~
" ~~~ footer="
" ~~~ }%

Mapping names

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

Marking a selection

Using marker

%~~ FLEXWEBLIST{
~~~   exclude="TestCases|Trash.*"
~~~   format="$indent   * <span class=\"$marker\"> $web </span>$n"
~~~   marker="twikiAlert"
~~~   selection="%BASEWEB%"
~~~ }%
%FLEXWEBLIST{exclude="TestCases|Trash.*" format="$indent * $web $n" marker="twikiAlert" selection="Plugins"}%

Using markerformat

%~~ FLEXWEBLIST{
~~~   exclude="TestCases|Trash.*"
~~~   format="$indent   * [[$web.WebHome][$name]]$n"
~~~   markerformat="$indent   * 
~~~     [[$web.WebHome][<span class=\"twikiAlert\">$name</span>]]$n"
~~~   selection="%BASEWEB%"
~~~ }%
%FLEXWEBLIST{exclude="TestCases|Trash.*" format="$indent * $name$n" markerformat="$indent * $name$n" selection="Plugins"}%
Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r2 - 2007-02-13 - PeterThoeny
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.