Render List Plugin

Render bullet lists in a variety of formats

Syntax Rules

  • Place a %RENDERLIST{ <parameters> }% before any bullet list
    • The lists can be handcrafted, generated by another Plugin, a %TOC%, or the result of a FormattedSearch
  • Supported parameters:
    "name" or
    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.

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
           continue
   * two
   * three

one
one.a
one.a.x
one.b
one.b.x
continue
one.b.y
continue
two
three

one
one.a
one.a.x
one.b
one.b.x
continue
one.b.y
continue
two
three

%RENDERLIST{"org"}%
   * one
      * one.a
         * one.a.x
      * one.b
         * one.b.x
           continue
         * one.b.y
           continue
   * two
   * three

  one
  one.a
  one.a.x
  one.b
  one.b.x
  continue
  one.b.y
  continue
  two
  three

  one
  one.a
  one.a.x
  one.b
  one.b.x
  continue
  one.b.y
  continue
  two
  three

%RENDERLIST{ "org" focus="one.b" }%
   * one
      * one.a
         * one.a.x
      * one.b
         * one.b.x
           continue
         * one.b.y
           continue
   * two
   * three

  one
  one.b
  one.b.x
  continue
  one.b.y
  continue

  one
  one.b
  one.b.x
  continue
  one.b.y
  continue

RenderListPlugin 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 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, empty.gif, dot_udr.gif, dot_ud.gif, dot_ur.gif, home.gif
    • Set ORG_THEME = icon, 0, 16, 16, empty.gif, dot_udr.gif, dot_ud.gif, dot_ur.gif, home.gif
    • Set GROUP_THEME = icon, 0, 16, 16, empty.gif, dot_udr.gif, dot_ud.gif, dot_ur.gif, group.gif
    • Set EMAIL_THEME = icon, 0, 16, 16, empty.gif, dot_udr.gif, dot_ud.gif, dot_ur.gif, email.gif

Plugin Installation Instructions

Note: You do not need to install anything on the browser to use this plugin. The following instructions are for the administrator who installs the plugin on the server where TWiki is running.

  • Download the ZIP file from the Plugin web (see below)
  • Unzip RenderListPlugin.zip in your twiki installation directory. Content:
    File: Description:Sorted descending
    data/TWiki/RenderListPlugin.txt,v Plugin topic repository
    data/TWiki/RenderListPlugin.txt Plugin topic
    lib/TWiki/Plugins/RenderListPlugin.pm Plugin Perl module
    pub/TWiki/RenderListPlugin/*.gif Image files for themes
  • Test if the installation was successful:
    • See if the above example works

Plugin Info

Plugin Author: TWiki:Main/PeterThoeny
Plugin Version: 11 Dec 2003 (V1.020)
Change History:  
11 Dec 2003: Added focus and depth parameters
05 Dec 2003: Fixed rendering issue with IE, added EMAIL_THEME
02 Dec 2003: Initial version
CPAN Dependencies: none
Other Dependencies: none
Perl Version: 5.005
Plugin Home: http://TWiki.org/cgi-bin/view/Plugins/RenderListPlugin
Feedback: http://TWiki.org/cgi-bin/view/Plugins/RenderListPluginDev

Related Topics: TWikiPreferences, TWikiPlugins, TWiki:Plugins/TreePlugin

-- TWiki:Main/PeterThoeny - 11 Dec 2003


This topic: TWiki > RenderListPlugin
Topic revision: r3 - 2003-12-12 - PeterThoeny
 
This site is powered by the TWiki collaboration platformCopyright © 1999-2024 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.RenderListPlugin.