%META:TOPICINFO{author="TWikiContributor" date="1530854107" format="1.1" version="20"}% ---+ Render List Plugin
%TOC{title="Page contents"}%
%SHORTDESCRIPTION% ---++ Syntax Rules ---+++ RENDERLIST Variable * Place a =%RENDERLIST{ <parameters> }%= above any bullet list * The list can be handcrafted, generated by another plugin, a =%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 =[[][]]= 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 by one level at a time * =Like this= * It's OK to decrease more than one indentation levels at a time * Wrap long text, e.g. split it up into 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%.TWikiDocGraphics icon can be used as well: * =%ICON{name}% Followed by normal bullet text= ---++ Examples
__You type:__ __You get: (simulated)__ __You get: (if installed)__
%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
one
one.a
one.a.x
one.b
one.b.x
continue
one.b.y
Tim
Mico
two
three
%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
%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
  one
  one.a
  one.a.x
  one.b
  one.b.x
  continue
  one.b.y
  Tim
  Mico
  two
  three
%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
%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
  one
  one.b
  one.b.x
  continue
  one.b.y
  Tim
  Mico
%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
---++ %TOPIC% Settings Plugin settings are stored as preferences variables. To reference a plugin setting write ==%<plugin>_<setting>%==, i.e. ==%RENDERPLUGIN_SHORTDESCRIPTION%== * One line description, is shown in the %SYSTEMWEB%.TextFormattingRules topic: * Set SHORTDESCRIPTION = Render bullet lists in a variety of formats * Debug plugin: (See output in =data/debug.txt=) * Set DEBUG = 0 * Themes are named =<SOMETHING>_THEME= and contain a comma delimited list of render type with parameters: * Set THREAD_THEME = tree, 1 * Set HOME_THEME = icon, 1, 16, 16, %ATTACHURL%/empty.gif, %ATTACHURL%/dot_udr.gif, %ATTACHURL%/dot_ud.gif, %ATTACHURL%/dot_ur.gif, %ATTACHURL%/home.gif * Set ORG_THEME = icon, 0, 16, 16, %ATTACHURL%/empty.gif, %ATTACHURL%/dot_udr.gif, %ATTACHURL%/dot_ud.gif, %ATTACHURL%/dot_ur.gif, %ATTACHURL%/home.gif * Set GROUP_THEME = icon, 0, 16, 16, %ATTACHURL%/empty.gif, %ATTACHURL%/dot_udr.gif, %ATTACHURL%/dot_ud.gif, %ATTACHURL%/dot_ur.gif, %ATTACHURL%/group.gif * Set EMAIL_THEME = icon, 0, 16, 16, %ATTACHURL%/empty.gif, %ATTACHURL%/dot_udr.gif, %ATTACHURL%/dot_ud.gif, %ATTACHURL%/dot_ur.gif, %ATTACHURL%/email.gif * Set TREND_THEME = icon, 0, 16, 16, %ATTACHURL%/empty.gif, %ATTACHURL%/dot_udr.gif, %ATTACHURL%/dot_ud.gif, %ATTACHURL%/dot_ur.gif, %ATTACHURL%/trend.gif * Set FILE_THEME = 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 This plugin is pre-installed. TWiki administrators can upgrade the plugin as needed on the TWiki server. %TWISTY{ mode="div" showlink="Show details %ICONURL{toggleopen}% " hidelink="Hide details %ICONURL{toggleclose}% " }% * For an __automated installation__, run the [[%SCRIPTURL{configure}%][configure]] script and follow "Find More Extensions" in the in the __Extensions__ section. * Or, follow these __manual installation__ steps: * Download the ZIP file from the Plugins home (see below). * Unzip ==RenderListPlugin.zip== in your twiki installation directory. Content: | *File:* | *Description:* | | ==data/TWiki/%TOPIC%.txt== | Plugin topic | | ==data/TWiki/VarRENDERLIST.txt== | Documentation of the RENDERLIST variable | | ==pub/TWiki/%TOPIC%/*.gif== | Image files for themes | | ==lib/TWiki/Plugins/%TOPIC%.pm== | Plugin Perl module | * Set the ownership of the extracted directories and files to the webserver user. * Plugin __configuration and testing__: * Run the [[%SCRIPTURL{configure}%][configure]] script and enable the plugin in the __Plugins__ section. * Test if the installation was successful: See example above. %ENDTWISTY% ---++ Plugin Info %TABLE{ tablewidth="100%" columnwidths="170," }% | Plugin Author: | TWiki:Main.PeterThoeny | | Copyright: | © 2003-2018 Peter[at]Thoeny.org, [[http://twiki.org/][TWiki.org]]%BR% © 2003-2018 TWiki:TWiki.TWikiContributor | | License: | GPL ([[http://www.gnu.org/copyleft/gpl.html][GNU General Public License]]) | | Plugin Version: | 2018-07-05 | %TWISTY{ mode="div" showlink="Show Change History %ICONURL{toggleopen}%" hidelink="Hide Change History %ICONURL{toggleclose}% " }% %TABLE{ tablewidth="100%" columnwidths="170," }% | 2018-07-05: | TWikibug:Item7841: Copyright update to 2018 | | 2016-01-09: | TWikibug:Item7708: Copyright update to 2016 | | 2015-01-15: | TWikibug:Item7604: Switch from GPL v2 to v3 | | 2013-01-28: | TWikibug:Item7091: Use TWISTY in installation instructions and change history | | 2012-11-14: | TWikibug:Item7020: Categorize TWiki Variable RENDERLIST | | 2012-09-05: | TWikibug:Item6837: Doc fixes | | 2011-07-09: | TWikibug:Item6725: Change global package variables from "use vars" to "our" | | 2010-05-16: | 2.1: TWikibug:Item6433 - doc improvements; replacing TWIKIWEB with SYSTEMWEB | | 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%.TWikiVariables | | 23 Sep 2006: | Support for img tag and image URL after =icon:= (suggested by TWiki:Main.JanFilipsky); support for %SYSTEMWEB%.TWikiDocGraphics icons, such as =%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 | %ENDTWISTY% %TABLE{ tablewidth="100%" columnwidths="170," }% | CPAN Dependencies: | none | | Other Dependencies: | none | | Perl Version: | 5.005 | | TWiki:Plugins/Benchmark: | %SYSTEMWEB%.GoodStyle 97%, %SYSTEMWEB%.FormattedSearch 98%, RenderListPlugin 93% | | Plugin Home: | http://TWiki.org/cgi-bin/view/Plugins/%TOPIC% | | Feedback: | http://TWiki.org/cgi-bin/view/Plugins/%TOPIC%Dev | | Appraisal: | http://TWiki.org/cgi-bin/view/Plugins/%TOPIC%Appraisal | __Related Topics:__ %SYSTEMWEB%.VarRENDERLIST, %SYSTEMWEB%.TWikiPlugins, %SYSTEMWEB%.DeveloperDocumentationCategory, %SYSTEMWEB%.AdminDocumentationCategory, %SYSTEMWEB%.TWikiPreferences, TWiki:Plugins.TreePlugin %META:FILEATTACHMENT{name="empty.gif" attr="h" comment="Empty 16x16 spacer" date="1070383918" path="empty.gif" size="100" user="TWikiContributor" version="1"}% %META:FILEATTACHMENT{name="email.gif" attr="h" comment="E-mail icon 16x16" date="1070614932" path="email.gif" size="183" user="TWikiContributor" version="1"}% %META:FILEATTACHMENT{name="xls.gif" attr="h" comment="XLS icon 16x16" date="1078162404" path="xls.gif" size="918" user="TWikiContributor" version="1"}% %META:FILEATTACHMENT{name="file.gif" attr="h" comment="File icon 16x16" date="1078160664" path="file.gif" size="151" user="TWikiContributor" version="1"}% %META:FILEATTACHMENT{name="person.gif" attr="h" comment="Person icon 16x16" date="1071565646" path="person.gif" size="153" user="TWikiContributor" version="1"}% %META:FILEATTACHMENT{name="doc.gif" attr="h" comment="Doc icon 16x16" date="1078160958" path="doc.gif" size="922" user="TWikiContributor" version="1"}% %META:FILEATTACHMENT{name="virtualpersons.gif" attr="h" comment="Virtual persons icon 16x16" date="1072693460" path="virtualpersons.gif" size="160" user="TWikiContributor" version="1"}% %META:FILEATTACHMENT{name="virtualperson.gif" attr="h" comment="Virtual person icon 16x16" date="1072693450" path="virtualperson.gif" size="149" user="TWikiContributor" version="1"}% %META:FILEATTACHMENT{name="group.gif" attr="h" comment="Group icon 16x16" date="1071565632" path="group.gif" size="162" user="TWikiContributor" version="1.2"}% %META:FILEATTACHMENT{name="dot_ur.gif" attr="h" comment="Dot L-graph 16x16" date="1070383984" path="dot_ur.gif" size="106" user="TWikiContributor" version="1"}% %META:FILEATTACHMENT{name="ppt.gif" attr="h" comment="PPT icon 16x16" date="1078160706" path="ppt.gif" size="921" user="TWikiContributor" version="1"}% %META:FILEATTACHMENT{name="pdf.gif" attr="h" comment="PDF icon 16x16" date="1078160694" path="pdf.gif" size="938" user="TWikiContributor" version="1"}% %META:FILEATTACHMENT{name="dot_udr.gif" attr="h" comment="Dot T-graph 16x16" date="1070384070" path="dot_udr.gif" size="109" user="TWikiContributor" version="1"}% %META:FILEATTACHMENT{name="persons.gif" attr="h" comment="Two persons icon 16x16" date="1071565666" path="persons.gif" size="164" user="TWikiContributor" version="1"}% %META:FILEATTACHMENT{name="sound.gif" attr="h" comment="Sound icon 16x16" date="1078160718" path="sound.gif" size="166" user="TWikiContributor" version="1"}% %META:FILEATTACHMENT{name="home.gif" attr="h" comment="Home icon 16x16" date="1070383996" path="home.gif" size="172" user="TWikiContributor" version="1"}% %META:FILEATTACHMENT{name="folder.gif" attr="h" comment="Folder icon 16x16" date="1078160636" path="folder.gif" size="903" user="TWikiContributor" version="1"}% %META:FILEATTACHMENT{name="zip.gif" attr="h" comment="ZIP icon 16x16" date="1078160730" path="zip.gif" size="940" user="TWikiContributor" version="1"}% %META:FILEATTACHMENT{name="image.gif" attr="h" comment="Image icon 16x16" date="1078160678" path="image.gif" size="943" user="TWikiContributor" version="1"}% %META:FILEATTACHMENT{name="see.gif" attr="h" comment="See icon 16x16" date="1078161392" path="see.gif" size="81" user="TWikiContributor" version="1"}% %META:FILEATTACHMENT{name="trend.gif" attr="h" comment="Trend icon 16x16" date="1072172998" path="trend.gif" size="149" user="TWikiContributor" version="1"}% %META:FILEATTACHMENT{name="dot_ud.gif" attr="h" comment="Dot I-graph 16x16" date="1070383970" path="dot_ud.gif" size="108" user="TWikiContributor" version="1"}% %META:FILEATTACHMENT{name="virtualhome.gif" attr="h" comment="Virtual home icon 16x16" date="1072693432" path="virtualhome.gif" size="162" user="TWikiContributor" version="1"}% %META:FILEATTACHMENT{name="globe.gif" attr="h" comment="Globe icon 16x16" date="1075199580" path="globe.gif" size="1024" user="TWikiContributor" version="1"}% %META:FILEATTACHMENT{name="folders.gif" attr="h" comment="Folders icon 16x16" date="1158991906" path="folders.gif" size="913" user="TWikiContributor" version="1"}% %META:FILEATTACHMENT{name="files.gif" attr="h" comment="Files icon 16x16" date="1158991940" path="files.gif" size="907" user="TWikiContributor" version="1"}%