Flex Web-List Examples

These are some simple examples to show how to use the basic features of the FlexWebListPlugin. Please create some sub-webs in the Sandbox web for a better illustration of the examples below.

No params

%FLEXWEBLIST%
BioinfoCourse CMBEducation CMBEducation/BiomedKI CMBEducation/BiomedKTH CMBEducation/CellbiologyGenetics CMBEducation/MedSchool CMBEducationIntra Main ResearchSchool ResearchSchool/CC0000 ResearchSchool/CC0001 ResearchSchool/CC0002 ResearchSchool/CC0003 ResearchSchool/CC1837 ResearchSchool/CC1837_Y08S ResearchSchool/CC2187 ResearchSchool/CC2188 ResearchSchool/CC2189 ResearchSchool/CC2192 ResearchSchool/CC2192_Y08A ResearchSchool/CC2271 ResearchSchool/CC2281 ResearchSchool/CC2339 ResearchSchool/CC2356 ResearchSchool/CC2QA006 ResearchSchool/CellularReprogramming ResearchSchool/ConceptsDevelopment ResearchSchool/EmergencyMedicine ResearchSchool/FunctionalArchitecture ResearchSchool/IndustrySkills ResearchSchool/OphthalmologyStemcells ResearchSchool/StemcellEngineering ResearchSchool/ZebraFish TWiki

Influencing order

%FLEXWEBLIST{webs="%USERSWEB%,public,%SYSTEMWEB%"}%
Main BioinfoCourse CMBEducation CMBEducation/BiomedKI CMBEducation/BiomedKTH CMBEducation/CellbiologyGenetics CMBEducation/MedSchool CMBEducationIntra ResearchSchool ResearchSchool/CC0000 ResearchSchool/CC0001 ResearchSchool/CC0002 ResearchSchool/CC0003 ResearchSchool/CC1837 ResearchSchool/CC1837_Y08S ResearchSchool/CC2187 ResearchSchool/CC2188 ResearchSchool/CC2189 ResearchSchool/CC2192 ResearchSchool/CC2192_Y08A ResearchSchool/CC2271 ResearchSchool/CC2281 ResearchSchool/CC2339 ResearchSchool/CC2356 ResearchSchool/CC2QA006 ResearchSchool/CellularReprogramming ResearchSchool/ConceptsDevelopment ResearchSchool/EmergencyMedicine ResearchSchool/FunctionalArchitecture ResearchSchool/IndustrySkills ResearchSchool/OphthalmologyStemcells ResearchSchool/StemcellEngineering ResearchSchool/ZebraFish TWiki

Controlling subwebs

No subwebs

%FLEXWEBLIST{subwebs="none"}%
BioinfoCourse CMBEducation CMBEducationIntra Main ResearchSchool TWiki

Only subwebs

%FLEXWEBLIST{subwebs="only"}%
CMBEducation/BiomedKI CMBEducation/BiomedKTH CMBEducation/CellbiologyGenetics CMBEducation/MedSchool ResearchSchool/CC0000 ResearchSchool/CC0001 ResearchSchool/CC0002 ResearchSchool/CC0003 ResearchSchool/CC1837 ResearchSchool/CC1837_Y08S ResearchSchool/CC2187 ResearchSchool/CC2188 ResearchSchool/CC2189 ResearchSchool/CC2192 ResearchSchool/CC2192_Y08A ResearchSchool/CC2271 ResearchSchool/CC2281 ResearchSchool/CC2339 ResearchSchool/CC2356 ResearchSchool/CC2QA006 ResearchSchool/CellularReprogramming ResearchSchool/ConceptsDevelopment ResearchSchool/EmergencyMedicine ResearchSchool/FunctionalArchitecture ResearchSchool/IndustrySkills ResearchSchool/OphthalmologyStemcells ResearchSchool/StemcellEngineering ResearchSchool/ZebraFish

Subwebs of "Sandbox"

%FLEXWEBLIST{subwebs="Sandbox"}%

Using include and exclude

Exclude TestCases and Trash webs

%FLEXWEBLIST{exclude="TestCases|Trash.*" subwebs="none"}%
BioinfoCourse CMBEducation CMBEducationIntra Main ResearchSchool TWiki

Include Sandbox web and all of its subwebs

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

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="Sandbox"
 format="$indent   * [[$web.%HOMETOPIC%][$name]]$n"
 markerformat="$percntFLEXWEBLIST{ webs=\"$web\" format=\"$dollarindent   * [[$dollarweb.%HOMETOPIC%][$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>" 
}%

Twisty navigation

needs the TWiki:Plugins/TwistyPlugin and the TWiki:Plugins/IfDefinedPlugin

%FLEXWEBLIST{
 webs="%USERSWEB%,public,%SYSTEMWEB%"
 exclude="TestCases|Trash.*"
 header="<ul>"
 format="<li>[[$web.%HOMETOPIC%][$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

Mapping names

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

Marking a selection

Using marker

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

Using markerformat

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

Related Topics: FlexWebListNavi, FlexWebListPlugin, FlexWebListTree

Topic revision: r2 - 2011-06-27 - TWikiAdminUser
 
This site is powered by the TWiki collaboration platformCopyright © 1999-2012 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.