---+ Render List Plugin <!-- * Set SHORTDESCRIPTION = Render bullet lists in a variety of formats --> %SHORTDESCRIPTION% ---++ Syntax Rules ---+++ RENDERLIST Macro * Place a =%<nop>RENDERLIST{ <parameters> }%= before any bullet list * The lists can be handcrafted, generated by another Plugin, a =%<nop>TOC%=, or the result of a %SYSTEMWEB%.FormattedSearch * Supported parameters: | ="name"= or%BR% =theme="name"= | Select a rendering theme | | =focus="any text"= | Focus list on a bullet with specified text | | =depth="2"= | Remove bullets with an indent greater then the depth. The depth is relative to the highlighted bullet in case =focus= is specified | * Rendering themes can be defined by =<name>_THEME= Plugin settings * Each theme is defined by a comma separated list containing the render type and parameters required by that render type * There are different render types; this initial Plugin version has *tree* and *icon* render types * Format of the *tree* render type: * =Set <name>_THEME = tree, <0/1 flag to suppress/show lines of first level>= * Format of the *icon* render type: * =Set <name>_THEME = icon, <0/1 flag to suppress/show lines of first level>, <icon width>, <icon height>, <spacer graph>, <T-line graph>, <I-line graph>, <L-line graph>, <icon image>= * To define new Icon themes, attach images to this Plugin topic and set the parameters accordingly * Focus bullet list: * Search bullet list for text. If a bullet is found: 1. Highlight text and remove =[<nop>[][]]= links on bullet where text is found 2. Reduce bullet list to show only its parents and children * This is useful to maintain one large bullet list with links to team pages, representing the organization of a company. Each team page can INCLUDE the bullet list with focus set to itself. ---+++ Bullets * Use regular ==*== bullets * Start with level one * Increase indentation only one level at a time * =Like this= * Decreasing indentation many levels at a time is OK * Wrap long text with continuation lines, the Plugin does not do that for you%BR% =Align continuation lines with leading spaces like this= * You can specify an icon for a bullet of render type *tree* or *icon*: * Attach the icon to this Plugin topic, e.g. =myicon.gif=, or * Use one of the existing icons: %ATTACHURL%/globe.gif =globe.gif=, %ATTACHURL%/home.gif =home.gif=, %ATTACHURL%/virtualhome.gif =virtualhome.gif=, %ATTACHURL%/group.gif =group.gif=, %ATTACHURL%/persons.gif =persons.gif=, %ATTACHURL%/virtualpersons.gif =virtualpersons.gif=, %ATTACHURL%/person.gif =person.gif=, %ATTACHURL%/virtualperson.gif =virtualperson.gif=, %ATTACHURL%/email.gif =email.gif=, %ATTACHURL%/trend.gif =trend.gif=, %ATTACHURL%/folder.gif =folder.gif=, %ATTACHURL%/folders.gif =folders.gif=, %ATTACHURL%/file.gif =file.gif=, %ATTACHURL%/files.gif =files.gif=, %ATTACHURL%/doc.gif =doc.gif=, %ATTACHURL%/image.gif =image.gif=, %ATTACHURL%/pdf.gif =pdf.gif=, %ATTACHURL%/ppt.gif =ppt.gif=, %ATTACHURL%/sound.gif =sound.gif=, %ATTACHURL%/xls.gif =xls.gif=, %ATTACHURL%/zip.gif =zip.gif=, %ATTACHURL%/see.gif =see.gif= * Refer to an attached icon at the beginning of the bullet with: * =icon:myicon Followed by normal bullet text= * Any %SYSTEMWEB%.DocumentGraphics icon can be used as well: * =%<nop>ICON{name}% Followed by normal bullet text= ---++ Examples <table border="0" cellspacing="5" cellpadding="3"><tr><th valign="top" bgcolor="#CCCCC"> *You type:* </th><th valign="top" bgcolor="#CCCCC"> *You get: (simulated)* </th><th valign="top" bgcolor="#CCCCC"> *You get: (if installed)* </th></tr> <tr><td valign="top" bgcolor="#EEEEEE"> <pre class="tml"> %<nop>RENDERLIST{"thread"}% * one * one.a * one.a.x * one.b * one.b.x continue * one.b.y * icon:person Tim * icon:person Mico * two * three </pre> </td><td valign="top" bgcolor="#EEEEEE"> <table border="0" cellspacing="0" cellpadding="0"><tr> <td valign="top"><img src="%ATTACHURL%/dot_udr.gif" width="16" height="16" alt="" border="0" /></td> <td valign="top" class="foswikiNoBreak" > one </td> </tr></table> <table border="0" cellspacing="0" cellpadding="0"><tr> <td valign="top"><img src="%ATTACHURL%/dot_ud.gif" width="16" height="16" alt="" border="0" /></td> <td valign="top"><img src="%ATTACHURL%/dot_udr.gif" width="16" height="16" alt="" border="0" /></td> <td valign="top" class="foswikiNoBreak" > one.a </td> </tr></table> <table border="0" cellspacing="0" cellpadding="0"><tr> <td valign="top"><img src="%ATTACHURL%/dot_ud.gif" width="16" height="16" alt="" border="0" /></td> <td valign="top"><img src="%ATTACHURL%/dot_ud.gif" width="16" height="16" alt="" border="0" /></td> <td valign="top"><img src="%ATTACHURL%/dot_ur.gif" width="16" height="16" alt="" border="0" /></td> <td valign="top" class="foswikiNoBreak" > one.a.x </td> </tr></table> <table border="0" cellspacing="0" cellpadding="0"><tr> <td valign="top"><img src="%ATTACHURL%/dot_ud.gif" width="16" height="16" alt="" border="0" /></td> <td valign="top"><img src="%ATTACHURL%/dot_ur.gif" width="16" height="16" alt="" border="0" /></td> <td valign="top" class="foswikiNoBreak" > one.b </td> </tr></table> <table border="0" cellspacing="0" cellpadding="0"><tr> <td valign="top"><img src="%ATTACHURL%/dot_ud.gif" width="16" height="16" alt="" border="0" /></td> <td valign="top"><img src="%ATTACHURL%/empty.gif" width="16" height="16" alt="" border="0" /></td> <td valign="top"><img src="%ATTACHURL%/dot_udr.gif" width="16" height="16" alt="" border="0" /></td> <td valign="top" class="foswikiNoBreak" > one.b.x </td> </tr></table> <table border="0" cellspacing="0" cellpadding="0"><tr> <td valign="top"><img src="%ATTACHURL%/dot_ud.gif" width="16" height="16" alt="" border="0" /></td> <td valign="top"><img src="%ATTACHURL%/empty.gif" width="16" height="16" alt="" border="0" /></td> <td valign="top"><img src="%ATTACHURL%/dot_ud.gif" width="16" height="16" alt="" border="0" /></td> <td valign="top" class="foswikiNoBreak" > continue </td> </tr></table> <table border="0" cellspacing="0" cellpadding="0"><tr> <td valign="top"><img src="%ATTACHURL%/dot_ud.gif" width="16" height="16" alt="" border="0" /></td> <td valign="top"><img src="%ATTACHURL%/empty.gif" width="16" height="16" alt="" border="0" /></td> <td valign="top"><img src="%ATTACHURL%/dot_ur.gif" width="16" height="16" alt="" border="0" /></td> <td valign="top" class="foswikiNoBreak" > one.b.y </td> </tr></table> <table border="0" cellspacing="0" cellpadding="0"><tr> <td valign="top"><img src="%ATTACHURL%/dot_ud.gif" width="16" height="16" alt="" border="0" /></td> <td valign="top"><img src="%ATTACHURL%/empty.gif" width="16" height="16" alt="" border="0" /></td> <td valign="top"><img src="%ATTACHURL%/empty.gif" width="16" height="16" alt="" border="0" /></td> <td valign="top"><img src="%ATTACHURL%/dot_udr.gif" width="16" height="16" alt="" border="0" /></td> <td valign="top"><img src="%ATTACHURL%/person.gif" width="16" height="16" alt="" border="0" /></td> <td valign="top" class="foswikiNoBreak" > Tim </td> </tr></table> <table border="0" cellspacing="0" cellpadding="0"><tr> <td valign="top"><img src="%ATTACHURL%/dot_ud.gif" width="16" height="16" alt="" border="0" /></td> <td valign="top"><img src="%ATTACHURL%/empty.gif" width="16" height="16" alt="" border="0" /></td> <td valign="top"><img src="%ATTACHURL%/empty.gif" width="16" height="16" alt="" border="0" /></td> <td valign="top"><img src="%ATTACHURL%/dot_ur.gif" width="16" height="16" alt="" border="0" /></td> <td valign="top"><img src="%ATTACHURL%/person.gif" width="16" height="16" alt="" border="0" /></td> <td valign="top" class="foswikiNoBreak" > Mico </td> </tr></table> <table border="0" cellspacing="0" cellpadding="0"><tr> <td valign="top"><img src="%ATTACHURL%/dot_udr.gif" width="16" height="16" alt="" border="0" /></td> <td valign="top"> two </td> </tr></table> <table border="0" cellspacing="0" cellpadding="0"><tr> <td valign="top"><img src="%ATTACHURL%/dot_ur.gif" width="16" height="16" alt="" border="0" /></td> <td valign="top" class="foswikiNoBreak" > three </td> </tr></table> </td><td valign="top" bgcolor="#EEEEEE"> %RENDERLIST{"thread"}% * one * one.a * one.a.x * one.b * one.b.x continue * one.b.y * icon:person Tim * icon:person Mico * two * three </td></tr> <tr><td valign="top" bgcolor="#EEEEEE"> <pre class="tml"> %<nop>RENDERLIST{"org"}% * one * one.a * one.a.x * one.b * one.b.x continue * one.b.y * icon:person Tim * icon:person Mico * two * three </pre> </td><td valign="top" bgcolor="#EEEEEE"> <table border="0" cellspacing="0" cellpadding="0"><tr> <td valign="top"><img src="%ATTACHURL%/home.gif" width="16" height="16" alt="" border="0" /></td> <td valign="top" class="foswikiNoBreak" > one </td> </tr></table> <table border="0" cellspacing="0" cellpadding="0"><tr> <td valign="top"><img src="%ATTACHURL%/dot_udr.gif" width="16" height="16" alt="" border="0" /></td> <td valign="top"><img src="%ATTACHURL%/home.gif" width="16" height="16" alt="" border="0" /></td> <td valign="top" class="foswikiNoBreak" > one.a </td> </tr></table> <table border="0" cellspacing="0" cellpadding="0"><tr> <td valign="top"><img src="%ATTACHURL%/dot_ud.gif" width="16" height="16" alt="" border="0" /></td> <td valign="top"><img src="%ATTACHURL%/dot_ur.gif" width="16" height="16" alt="" border="0" /></td> <td valign="top"><img src="%ATTACHURL%/home.gif" width="16" height="16" alt="" border="0" /></td> <td valign="top" class="foswikiNoBreak" > one.a.x </td> </tr></table> <table border="0" cellspacing="0" cellpadding="0"><tr> <td valign="top"><img src="%ATTACHURL%/dot_ur.gif" width="16" height="16" alt="" border="0" /></td> <td valign="top"><img src="%ATTACHURL%/home.gif" width="16" height="16" alt="" border="0" /></td> <td valign="top class="foswikiNoBreak" "> one.b </td> </tr></table> <table border="0" cellspacing="0" cellpadding="0"><tr> <td valign="top"><img src="%ATTACHURL%/empty.gif" width="16" height="16" alt="" border="0" /></td> <td valign="top"><img src="%ATTACHURL%/dot_udr.gif" width="16" height="16" alt="" border="0" /></td> <td valign="top"><img src="%ATTACHURL%/home.gif" width="16" height="16" alt="" border="0" /></td> <td valign="top" class="foswikiNoBreak" > one.b.x </td> </tr></table> <table border="0" cellspacing="0" cellpadding="0"><tr> <td valign="top"><img src="%ATTACHURL%/empty.gif" width="16" height="16" alt="" border="0" /></td> <td valign="top"><img src="%ATTACHURL%/dot_ud.gif" width="16" height="16" alt="" border="0" /></td> <td valign="top"><img src="%ATTACHURL%/empty.gif" width="16" height="16" alt="" border="0" /></td> <td valign="top" class="foswikiNoBreak" > continue </td> </tr></table> <table border="0" cellspacing="0" cellpadding="0"><tr> <td valign="top"><img src="%ATTACHURL%/empty.gif" width="16" height="16" alt="" border="0" /></td> <td valign="top"><img src="%ATTACHURL%/dot_ur.gif" width="16" height="16" alt="" border="0" /></td> <td valign="top"><img src="%ATTACHURL%/home.gif" width="16" height="16" alt="" border="0" /></td> <td valign="top" class="foswikiNoBreak" > one.b.y </td> </tr></table> <table border="0" cellspacing="0" cellpadding="0"><tr> <td valign="top"><img src="%ATTACHURL%/empty.gif" width="16" height="16" alt="" border="0" /></td> <td valign="top"><img src="%ATTACHURL%/empty.gif" width="16" height="16" alt="" border="0" /></td> <td valign="top"><img src="%ATTACHURL%/dot_udr.gif" width="16" height="16" alt="" border="0" /></td> <td valign="top"><img src="%ATTACHURL%/person.gif" width="16" height="16" alt="" border="0" /></td> <td valign="top" class="foswikiNoBreak" > Tim </td> </tr></table> <table border="0" cellspacing="0" cellpadding="0"><tr> <td valign="top"><img src="%ATTACHURL%/empty.gif" width="16" height="16" alt="" border="0" /></td> <td valign="top"><img src="%ATTACHURL%/empty.gif" width="16" height="16" alt="" border="0" /></td> <td valign="top"><img src="%ATTACHURL%/dot_ur.gif" width="16" height="16" alt="" border="0" /></td> <td valign="top"><img src="%ATTACHURL%/person.gif" width="16" height="16" alt="" border="0" /></td> <td valign="top" class="foswikiNoBreak" > Mico </td> </tr></table> <table border="0" cellspacing="0" cellpadding="0"><tr> <td valign="top"><img src="%ATTACHURL%/home.gif" width="16" height="16" alt="" border="0" /></td> <td valign="top"> two </td> </tr></table> <table border="0" cellspacing="0" cellpadding="0"><tr> <td valign="top"><img src="%ATTACHURL%/home.gif" width="16" height="16" alt="" border="0" /></td> <td valign="top" class="foswikiNoBreak" > three </td> </tr></table> </td><td valign="top" bgcolor="#EEEEEE"> %RENDERLIST{"org"}% * one * one.a * one.a.x * one.b * one.b.x continue * one.b.y * icon:person Tim * icon:person Mico * two * three </td></tr> <tr><td valign="top" bgcolor="#EEEEEE"> <pre class="tml"> %<nop>RENDERLIST{ "org" focus="one.b" }% * one * one.a * one.a.x * one.b * one.b.x continue * one.b.y * icon:person Tim * icon:person Mico * two * three </pre> </td><td valign="top" bgcolor="#EEEEEE"> <table border="0" cellspacing="0" cellpadding="0"><tr> <td valign="top"><img src="%ATTACHURL%/home.gif" width="16" height="16" alt="" border="0" /></td> <td valign="top" class="foswikiNoBreak" > one </td> </tr></table> <table border="0" cellspacing="0" cellpadding="0"><tr> <td valign="top"><img src="%ATTACHURL%/dot_ur.gif" width="16" height="16" alt="" border="0" /></td> <td valign="top"><img src="%ATTACHURL%/home.gif" width="16" height="16" alt="" border="0" /></td> <td valign="top" class="foswikiNoBreak" > <b> one.b </b> </td> </tr></table> <table border="0" cellspacing="0" cellpadding="0"><tr> <td valign="top"><img src="%ATTACHURL%/empty.gif" width="16" height="16" alt="" border="0" /></td> <td valign="top"><img src="%ATTACHURL%/dot_udr.gif" width="16" height="16" alt="" border="0" /></td> <td valign="top"><img src="%ATTACHURL%/home.gif" width="16" height="16" alt="" border="0" /></td> <td valign="top" class="foswikiNoBreak" > one.b.x </td> </tr></table> <table border="0" cellspacing="0" cellpadding="0"><tr> <td valign="top"><img src="%ATTACHURL%/empty.gif" width="16" height="16" alt="" border="0" /></td> <td valign="top"><img src="%ATTACHURL%/dot_ud.gif" width="16" height="16" alt="" border="0" /></td> <td valign="top"><img src="%ATTACHURL%/empty.gif" width="16" height="16" alt="" border="0" /></td> <td valign="top" class="foswikiNoBreak" > continue </td> </tr></table> <table border="0" cellspacing="0" cellpadding="0"><tr> <td valign="top"><img src="%ATTACHURL%/empty.gif" width="16" height="16" alt="" border="0" /></td> <td valign="top"><img src="%ATTACHURL%/dot_ur.gif" width="16" height="16" alt="" border="0" /></td> <td valign="top"><img src="%ATTACHURL%/home.gif" width="16" height="16" alt="" border="0" /></td> <td valign="top" class="foswikiNoBreak" > one.b.y </td> </tr></table> <table border="0" cellspacing="0" cellpadding="0"><tr> <td valign="top"><img src="%ATTACHURL%/empty.gif" width="16" height="16" alt="" border="0" /></td> <td valign="top"><img src="%ATTACHURL%/empty.gif" width="16" height="16" alt="" border="0" /></td> <td valign="top"><img src="%ATTACHURL%/dot_udr.gif" width="16" height="16" alt="" border="0" /></td> <td valign="top"><img src="%ATTACHURL%/person.gif" width="16" height="16" alt="" border="0" /></td> <td valign="top" class="foswikiNoBreak" > Tim </td> </tr></table> <table border="0" cellspacing="0" cellpadding="0"><tr> <td valign="top"><img src="%ATTACHURL%/empty.gif" width="16" height="16" alt="" border="0" /></td> <td valign="top"><img src="%ATTACHURL%/empty.gif" width="16" height="16" alt="" border="0" /></td> <td valign="top"><img src="%ATTACHURL%/dot_ur.gif" width="16" height="16" alt="" border="0" /></td> <td valign="top"><img src="%ATTACHURL%/person.gif" width="16" height="16" alt="" border="0" /></td> <td valign="top" class="foswikiNoBreak" > Mico </td> </tr></table> </td><td valign="top" bgcolor="#EEEEEE"> %RENDERLIST{ "org" focus="one.b" }% * one * one.a * one.a.x * one.b * one.b.x continue * one.b.y * icon:person Tim * icon:person Mico * two * three </td></tr></table> ---++ Themes Themes are defined by setting a [[%SYSTEMWEB%.PreferenceSettings][preference]] called =RENDERLISTPLUGIN_<SOMETHING>_THEME= (for example, =RENDERLISTPLUGIN_THREAD_THEME= ) and contain a comma-delimited list of render type and parameters. The default themes are: | *Theme* | *Render type* | | THREAD | tree, 1 | | HOME | icon, 1, 16, 16, %ATTACHURL%/empty.gif, %ATTACHURL%/dot_udr.gif, %ATTACHURL%/dot_ud.gif, %ATTACHURL%/dot_ur.gif, %ATTACHURL%/home.gif | | ORG | icon, 0, 16, 16, %ATTACHURL%/empty.gif, %ATTACHURL%/dot_udr.gif, %ATTACHURL%/dot_ud.gif, %ATTACHURL%/dot_ur.gif, %ATTACHURL%/home.gif | | GROUP | icon, 0, 16, 16, %ATTACHURL%/empty.gif, %ATTACHURL%/dot_udr.gif, %ATTACHURL%/dot_ud.gif, %ATTACHURL%/dot_ur.gif, %ATTACHURL%/group.gif | | EMAIL | icon, 0, 16, 16, %ATTACHURL%/empty.gif, %ATTACHURL%/dot_udr.gif, %ATTACHURL%/dot_ud.gif, %ATTACHURL%/dot_ur.gif, %ATTACHURL%/email.gif | | TREND | icon, 0, 16, 16, %ATTACHURL%/empty.gif, %ATTACHURL%/dot_udr.gif, %ATTACHURL%/dot_ud.gif, %ATTACHURL%/dot_ur.gif, %ATTACHURL%/trend.gif | | FILE | icon, 0, 16, 16, %ATTACHURL%/empty.gif, %ATTACHURL%/dot_udr.gif, %ATTACHURL%/dot_ud.gif, %ATTACHURL%/dot_ur.gif, %ATTACHURL%/file.gif | ---++ Plugin Installation Instructions You do not need to install anything in the browser to use this extension. The following instructions are for the administrator who installs the extension on the server. Open configure, and open the "Extensions" section. Use "Find More Extensions" to get a list of available extensions. Select "Install". If you have any problems, or if the extension isn't available in =configure=, then you can still install manually from the command-line. See http://foswiki.org/Support/ManuallyInstallingExtensions for more help. * Test if the installation was successful: See if above examples work ---++ Plugin Info | Copyright: | Copyright (C) 2006-2007 Peter Thoeny, peter@thoeny.org and TWiki Contributors; 2008-2012 Foswiki Contributors | | License: | GPL ([[http://www.gnu.org/copyleft/gpl.html][GNU General Public License]]) | | Version: | v2.2.7 | | Release: | 2.2.7 | | Change History: | <!-- versions below in reverse order --> | | 28 Nov 2012: | 2.2.7: Foswiki 1.1.6 release. Item11267: Convert to perl version string. | | 06 Apr 2012: | 2.2.6: Foswiki 1.1.5 release. Item11453: convert to preRenderingHandler. | | 05 Dec 2011: | 2.2.5: Foswiki 1.1.4 release. Minor code and topic cleanup. | | 15 Jul 2011: | 2.2.4: fixed line parser - Foswikitask:Item10969 | | 11 Apr 2011: | 2.2.3: Version released with Foswiki 1.1.3. Only a minor change related to how the plugin is being upgraded | | 20 Sep 2010: | 2.2.2: Will Norris. =<nobr>= modernization - Foswikitask:Item9415 | | 01 Aug 2010: | 2.2.1: Paul Harvey. Documentation updates - Foswikitask:Item9415 | | 20 Sep 2009: | 2.2: Crawford Currie. Moved default themes out of plugin topic for efficiency. | | 16 Dec 2008: | 2.1: Kenneth Lavrsen. Foswiki version | | 15 Jan 2008: | 2.0: Kenneth Lavrsen. No more reporting warnings in the error log when a render list starts at deeper level than 1 | | 30 Sep 2007: | Added %SYSTEMWEB%.VarRENDERLIST to have it listed in [[%SYSTEMWEB%.Macros][Macros]] | | 23 Sep 2006: | Support for img tag and image URL after =icon:= (suggested by TWiki:Main.JanFilipsky); support for %SYSTEMWEB%.DocumentGraphics icons, such as =%<nop>ICON{folder}%= instead of =icon:folder=; added files.gif and folders.gif (contributed by TWiki:Main.SteveHobbs) | | 25 Apr 2006: | SVN sync, Cairo + Dakar compatibility | | 14 Apr 2006: | [[http://TWiki.org/cgi-bin/view/Codev/TWikiRelease04x00][TWikiRelease04x00]] compatibility update | | 21 Nov 2004: | Added benchmarks (no code changes) | | 21 Mar 2004: | Internal change: Fixed unofficial function call | | 01 Mar 2004: | Added FILE_THEME and folder/file icons | | 29 Dec 2003: | Fixed rendering issue if focus bullet contains =icon:name=; added TREND_THEME | | 16 Dec 2003: | Specify icons with =icon:name= syntax | | 11 Dec 2003: | Added =focus= and =depth= parameters | | 05 Dec 2003: | Fixed rendering issue with IE; added EMAIL_THEME | | 02 Dec 2003: | Initial version | | Plugin Home: | http://foswiki.org/Extensions/%TOPIC% | | Support: | http://foswiki.org/Support/%TOPIC% | --- *Related Topics:* [[%SYSTEMWEB%.Plugins][Plugins]], %SYSTEMWEB%.DeveloperDocumentationCategory, %SYSTEMWEB%.AdminDocumentationCategory, %SYSTEMWEB%.DefaultPreferences, %USERSWEB%.SitePreferences, Foswiki:Extensions/TreePlugin <!-- %JQREQUIRE{"chili"}% -->
This topic: System
>
Plugins
>
RenderListPlugin
Topic revision: revision 1 (raw view)
Copyright &© by the contributing authors. All material on this site is the property of the contributing authors.
Ideas, requests, problems regarding BACCHUS Wiki?
Send feedback