E
dit
A
ttach
P
rintable
r0 - 13 Jun 2002 - 05:54:00 -
TWikiContributor
You are here:
TWiki
>
TWiki Web
>
FlexWebListPlugin
<!-- PLEASE DO NOT EDIT THIS TOPIC It is automatically generated from the subversion repository, and any changes you make will simply be overwritten the next time a release is generated. Instead, you could check your fix in, raise a bug in the Bugs web, or mail the author. --> ---+!! <nop>%TOPIC% %TOC% ---++ Description This is a replacement for TWiki's standard [[%TWIKIWEB%.VarWEBLIST][WEBLIST]] variable. It is extended to improve the display of hierarchical web structures, a feature added to TWiki4 and adds more flexibility when used in <nop>TWikiApplications. The FLEXWEBLIST can be used for example to generate a hierarchical navigatio scheme or a nested sitemap. ---++ Syntax =%<nop>FLEXWEBLIST{...}%= This tag iterates over all specified webs and all of their subwebs recursively while using the specified format strings to produce the output. Parameters: * =webs=: a list of webs to be displayed and/or "public" - a list of all non-hidden webs, "webtemplate" - a list of all template webs; "publiccurrent" - a list of all non-hidden webs including the current one; (defaults to "public") * =format=: format string to render one item (defaults to "$web ") * =header=: format string prepended to the output result * =footer=: format string appended to the result; if the list of webs is empty neither header nor footer are added. * =separator=: text to be put between webs; can be =none= for no separators * =subformat=: format string to be used to format subwebs (defaults to =format=) * =subheader=: format string preceding the output of any subweb (defaults to =header=) * =subfooter=: format string following the output of any subweb; subheader and subfooter are only added if the list of subwebs of the current web is not empty (defaults to =footer=) * =subseparator=: text to be put between subwebs; can be =none= for no separators (defaults to =separator=) * =subweb=: regular expression that subwebs must match to be listed; this can also be =none=, =all=, =only= to suppress subwebs, show all or only dispay explicitly mentioned subwebs (default is =all=) * =selection=: selected items in the list of webs * =marker=: text for =$marker= if the item maches the selection (see pseudo variables below) * =markerformat=: format string used instead of (sub)format string for selected items * =exclude=: regular expression of items excluded from the output * =include=: regular expressions of items that must match in order to be included in the output * =map=: list of =key=value= pairs to map the name of a web to a different value (e.g. map="TWiki=System,Main=Home" will expand the variable =$name= as "System" instead of TWiki and as "Home" instead "Main") Parameters default to the emtpy string if not mentioned otherwise. Note, that some of them although similar to WEBLIST have different default values. *Pseudo-variables*: Each of the above format strings (format, header, footer, subformat, subheader, subfooter and markerformat) may contain special variables that are replaced with a current value: * =$web=: the full name of the web, e.g. =Main/Foo/Bar= * =$qname=: the full name of the web in quotes, e.g. ="Main/Foo/Bar"= (deprecated) * =$name=: the name of the web without the leading parent webs, e.g. =Bar= * =$origname=: the original name of the web despite any name mapping * =$parent=: the name of the parent web of a sub web or the empty string if there's none * =$marker=: marker text (see above) if the current item is selected, empty otherwise * =$depth=: level of embedding of a subweb; main level web have depth 0 etc. * =$nrsubwebs=: number of subwebs a current web has * =$indent=: expands to three spaces for each level a web is embeded; main level webs get three spaces, subwebs on first level six spaces and so on. * =$indent(string)=: same as =$indent= but using =string= instead of three spaces * =$n=: replaced with a newline char (\n) * =$percnt=: replaced with a percent char (%) * =$dollar=: replaced with a dollar char ($) * =$nop=: removed from the format string before expanding common TWiki variables The following picture illustrates when which format strings are used <div class="box"> <div class="header">header</div> <div class="format">format</div> <div class="separator">separator</div> <div class="format">format</div> <div class="box"> <div class="header">subheader</div> <div class="format">subformat</div> <div class="box"> <div class="header">subheader</div> <div class="format">subformat</div> <div class="footer">subfooter</div> </div> <div class="separator">subseparator</div> ... <div class="separator">subseparator</div> <div class="format">subformat</div> <div class="footer">subfooter</div> </div> <div class="separator">separator</div> ... <div class="separator">subseparator</div> <div class="format">format</div> <div class="footer">footer</div> </div> <style type="text/css"> .box { border:1px solid blue; padding:10px; margin:10px; } .format, .separator, .header, .footer { margin:5px; padding:5px; } .header, .footer {border:1px solid green; } .format {border:1px solid red; } .separator {border:1px solid yellow;} </style> ---++ Examples See the FlexWebListExamples. ---++ Plugin Installation Instructions * [[%ATTACHURL%/%TOPIC%.zip][Download]] the ZIP file * Unzip ==%TOPIC%.zip== in your twiki installation directory. Content: | *File:* | *Description:* | | ==data/TWiki/FlexWebListExamples.txt== | | | ==data/TWiki/FlexWebListPlugin.txt== | | | ==lib/TWiki/Plugins/FlexWebListPlugin/Core.pm== | | | ==lib/TWiki/Plugins/FlexWebListPlugin.pm== | | * (Dakar) Visit =configure= in your TWiki installation, and enable the plugin in the {Plugins} section. ---++ Plugin Info <!-- provided for compatibility only * Set SHORTDESCRIPTION = Flexible way to display hierarchical weblists --> | Plugin Author: | TWiki:Main.MichaelDaum | | Copyright ©: | 2006-2007, MichaelDaum http://wikiring.de | | License: | GPL ([[http://www.gnu.org/copyleft/gpl.html][GNU General Public License]]) | | Plugin Version: | v1.00 | | Change History: | | | 08 May 2007: | docu fixes, respect HOMETOPIC in the examples | | 10 Mar 2007: | fixed expansion of $n and $nop | | 13 Oct 2006: | don't bail out entering a non-existing web | | 31 Aug 2006: | added NO_PREFS_IN_TOPIC;\ removed commonTagsHandler thus dropping support for cairo | | 03 Aug 2006: | fixed use of uninitialized value | | | start counting =$indent= at zero, not one; fixed the examples accordingly | | 02 Aug 2006: | added =publiccurrent= pseudo-web which is the sorted list of all public webs \ including the current one; fixed =$indent= not to assume multiples of 3 items \ to indent | | 31 Jul 2006: | don't filter webs that have been added explicitly added to =webs= | | | more fixes related to web filtering; fixed some testcases | | 28 Jul 2006: | preserve order in webs parameter | | 26 Jul 2006: | first release | | 05 Jul 2006: | initial version | | CPAN Dependencies: | none | | Other Dependencies: | none | | Perl Version: | 5.8 | | TWiki:Plugins/Benchmark: | %TWIKIWEB%.GoodStyle nn%, %TWIKIWEB%.FormattedSearch nn%, %TOPIC% nn% | | Plugin Home: | TWiki:Plugins/%TOPIC% | | Feedback: | TWiki:Plugins/%TOPIC%Dev | | Appraisal: | TWiki:Plugins/%TOPIC%Appraisal | -- TWiki:Main/MichaelDaum - 08 May 2007
E
dit
|
A
ttach
|
P
rintable
|
V
iew topic
|
Backlinks:
We
b
,
A
l
l Webs
|
H
istory
:
|
M
ore topic actions
TWiki
Log In
or
Register
TWiki Web
Users
Groups
Index
Search
Changes
Notifications
Statistics
Preferences
User Reference
ATasteOfTWiki
TextFormattingRules
TWikiVariables
FormattedSearch
TWikiDocGraphics
TWikiSkinBrowser
InstalledPlugins
Admin Maintenance
Reference Manual
AdminToolsCategory
InterWikis
ManagingWebs
TWikiSiteTools
TWikiPreferences
WebPreferences
Categories
Admin Documentation
Admin Tools
Developer Doc
User Documentation
User Tools
Main Webs
DI
EL
Education
Events
JoseLuisSilva
Personal
Research
Copyright © 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.FlexWebListPlugin