Shadows In The Fog

...discover TWiki details, and how to start your own site.
View   r1
FlexWebListExamples 1 - 17 Mar 2007 - User.TWikiGuest
Line: 1 to 1
Added:
>
>
META TOPICPARENT name="FlexWebListPlugin"

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%
SITF Sandbox TWiki User

Influencing order

%FLEXWEBLIST{webs="%MAINWEB%,public,%TWIKIWEB%"}%
User SITF Sandbox TWiki

Controlling subwebs

No subwebs

%FLEXWEBLIST{subwebs="none"}%
SITF Sandbox TWiki User

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"}%
SITF Sandbox TWiki User

Include Sandbox web and all of its subwebs

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

Creating lists

Simple nested list

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

Nested list using HTML

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

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"
~~~ }%

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>" 
~~~ }%
  • SITF (0)TWiki.TwistyPlugin.init("twisty_weblist_SITFshow");SITF (0)TWiki.TwistyPlugin.init("twisty_weblist_SITFhide");
    <-- END twistyPlugin-->
  • Sandbox (0)TWiki.TwistyPlugin.init("twisty_weblist_Sandboxshow");Sandbox (0)TWiki.TwistyPlugin.init("twisty_weblist_Sandboxhide");
    <-- END twistyPlugin-->
  • TWiki (0)TWiki.TwistyPlugin.init("twisty_weblist_TWikishow");TWiki (0)TWiki.TwistyPlugin.init("twisty_weblist_TWikihide");
    <-- END twistyPlugin-->
  • User (0)TWiki.TwistyPlugin.init("twisty_weblist_Usershow");User (0)TWiki.TwistyPlugin.init("twisty_weblist_Userhide");
    <-- END twistyPlugin-->

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>" 
~~~ }%

Sitemap

User Welcome to TWiki... Users?, Groups?
Sandbox Sandbox test area with all features enabled.
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.WebHome][$name]]$n"
~~~ }%

Marking a selection

Using marker

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

Using markerformat

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


Revision 1r1 - 17 Mar 2007 - 17:22:33 - TWikiGuest
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback
Note: Please contribute updates to this topic on TWiki.org at TWiki:TWiki.FlexWebListExamples
Syndicate this site RSSATOM