r1 - 13 Oct 2006 - 20:03:38 - TWikiGuestYou are here: CAMEL >  TWiki Web  >  FlexWebListPlugin > FlexWebListExamples

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%
BMCInterestGroup? CAMP CoreEIG? Main Mutation ProteinExpressionProject? Sandbox TWiki WormEvoDevo?

Influencing order

%FLEXWEBLIST{webs="%MAINWEB%,public,%TWIKIWEB%"}%
Main BMCInterestGroup? CAMP CoreEIG? Mutation ProteinExpressionProject? Sandbox WormEvoDevo? TWiki

Controlling subwebs

No subwebs

%FLEXWEBLIST{subwebs="none"}%
BMCInterestGroup? CAMP CoreEIG? Main Mutation ProteinExpressionProject? Sandbox TWiki WormEvoDevo?

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"}%
BMCInterestGroup? CAMP CoreEIG? Main Mutation ProteinExpressionProject? Sandbox TWiki WormEvoDevo?

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>" 
~~~ }%
  • BMCInterestGroup (0)TWiki.TwistyPlugin.init("twisty_weblist_BMCInterestGroupshow");BMCInterestGroup (0)TWiki.TwistyPlugin.init("twisty_weblist_BMCInterestGrouphide");
  • CAMP (0)TWiki.TwistyPlugin.init("twisty_weblist_CAMPshow");CAMP (0)TWiki.TwistyPlugin.init("twisty_weblist_CAMPhide");
  • CoreEIG (0)TWiki.TwistyPlugin.init("twisty_weblist_CoreEIGshow");CoreEIG (0)TWiki.TwistyPlugin.init("twisty_weblist_CoreEIGhide");
  • Main (0)TWiki.TwistyPlugin.init("twisty_weblist_Mainshow");Main (0)TWiki.TwistyPlugin.init("twisty_weblist_Mainhide");
  • Mutation (0)TWiki.TwistyPlugin.init("twisty_weblist_Mutationshow");Mutation (0)TWiki.TwistyPlugin.init("twisty_weblist_Mutationhide");
  • ProteinExpressionProject (0)TWiki.TwistyPlugin.init("twisty_weblist_ProteinExpressionProjectshow");ProteinExpressionProject (0)TWiki.TwistyPlugin.init("twisty_weblist_ProteinExpressionProjecthide");
  • Sandbox (0)TWiki.TwistyPlugin.init("twisty_weblist_Sandboxshow");Sandbox (0)TWiki.TwistyPlugin.init("twisty_weblist_Sandboxhide");
  • TWiki (0)TWiki.TwistyPlugin.init("twisty_weblist_TWikishow");TWiki (0)TWiki.TwistyPlugin.init("twisty_weblist_TWikihide");
  • WormEvoDevo (0)TWiki.TwistyPlugin.init("twisty_weblist_WormEvoDevoshow");WormEvoDevo (0)TWiki.TwistyPlugin.init("twisty_weblist_WormEvoDevohide");

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>" 
~~~ }%
  • Main  %IFDEFINEDTHEN{"0 " as="0 "}% %ELSEDEFINED% More...TWiki.TwistyPlugin.init("sitemap_Mainshow");CloseTWiki.TwistyPlugin.init("sitemap_Mainhide"); %FIDEFINED%
  • BMCInterestGroup  %IFDEFINEDTHEN{"0 " as="0 "}% %ELSEDEFINED% More...TWiki.TwistyPlugin.init("sitemap_BMCInterestGroupshow");CloseTWiki.TwistyPlugin.init("sitemap_BMCInterestGrouphide"); %FIDEFINED%
  • CAMP  %IFDEFINEDTHEN{"0 " as="0 "}% %ELSEDEFINED% More...TWiki.TwistyPlugin.init("sitemap_CAMPshow");CloseTWiki.TwistyPlugin.init("sitemap_CAMPhide"); %FIDEFINED%
  • CoreEIG  %IFDEFINEDTHEN{"0 " as="0 "}% %ELSEDEFINED% More...TWiki.TwistyPlugin.init("sitemap_CoreEIGshow");CloseTWiki.TwistyPlugin.init("sitemap_CoreEIGhide"); %FIDEFINED%
  • Mutation  %IFDEFINEDTHEN{"0 " as="0 "}% %ELSEDEFINED% More...TWiki.TwistyPlugin.init("sitemap_Mutationshow");CloseTWiki.TwistyPlugin.init("sitemap_Mutationhide"); %FIDEFINED%
  • ProteinExpressionProject  %IFDEFINEDTHEN{"0 " as="0 "}% %ELSEDEFINED% More...TWiki.TwistyPlugin.init("sitemap_ProteinExpressionProjectshow");CloseTWiki.TwistyPlugin.init("sitemap_ProteinExpressionProjecthide"); %FIDEFINED%
  • Sandbox  %IFDEFINEDTHEN{"0 " as="0 "}% %ELSEDEFINED% More...TWiki.TwistyPlugin.init("sitemap_Sandboxshow");CloseTWiki.TwistyPlugin.init("sitemap_Sandboxhide"); %FIDEFINED%
  • WormEvoDevo  %IFDEFINEDTHEN{"0 " as="0 "}% %ELSEDEFINED% More...TWiki.TwistyPlugin.init("sitemap_WormEvoDevoshow");CloseTWiki.TwistyPlugin.init("sitemap_WormEvoDevohide"); %FIDEFINED%
  • TWiki  %IFDEFINEDTHEN{"0 " as="0 "}% %ELSEDEFINED% More...TWiki.TwistyPlugin.init("sitemap_TWikishow");CloseTWiki.TwistyPlugin.init("sitemap_TWikihide"); %FIDEFINED%

Sitemap

Main Welcome to CAMEL... Users?, Groups?
BMCInterestGroup Resource for NIST scientists interesting in computing problems relevant to biomedical, biotech and related sectors
CAMP Planning pages for Critical Assessment of Mutant Prediction project
CoreEIG TWiki web for the core group of the Evolutionary Informatics Group.
ProteinExpressionProject Proposal for evaluation, analysis and engineering of protein over-expression systems
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%"
~~~ }%
  • BMCInterestGroup?
  • CAMP
  • CoreEIG?
  • Main
  • Mutation
  • ProteinExpressionProject?
  • Sandbox
  • TWiki
  • WormEvoDevo?

Using markerformat

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

Edit | WYSIWYG | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r1 | More topic actions
 
CAMEL TWiki home
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 CAMEL? Send feedback
Note: Please contribute updates to this topic on TWiki.org at TWiki:TWiki.FlexWebListExamples