# Render List Plugin Render bullet lists in a variety of formats ## Syntax Rules ### RENDERLIST Variable - Place a `%RENDERLIST{ }%` 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%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 `_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 _THEME = tree, <0/1 flag to suppress/show lines of first level>` - Format of the **icon** render type: - `Set _THEME = icon, <0/1 flag to suppress/show lines of first level>, , , , , , , ` - 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 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 linke 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: ![globe.gif](http://www.dementia.org/twiki//view/globe.gif) `globe.gif`, ![home.gif](http://www.dementia.org/twiki//view/home.gif) `home.gif`, ![virtualhome.gif](http://www.dementia.org/twiki//view/virtualhome.gif) `virtualhome.gif`, ![group.gif](http://www.dementia.org/twiki//view/group.gif) `group.gif`, ![persons.gif](http://www.dementia.org/twiki//view/persons.gif) `persons.gif`, ![virtualpersons.gif](http://www.dementia.org/twiki//view/virtualpersons.gif) `virtualpersons.gif`, ![person.gif](http://www.dementia.org/twiki//view/person.gif) `person.gif`, ![virtualperson.gif](http://www.dementia.org/twiki//view/virtualperson.gif) `virtualperson.gif`, ![email.gif](http://www.dementia.org/twiki//view/email.gif) `email.gif`, ![trend.gif](http://www.dementia.org/twiki//view/trend.gif) `trend.gif`, ![folder.gif](http://www.dementia.org/twiki//view/folder.gif) `folder.gif`, ![file.gif](http://www.dementia.org/twiki//view/file.gif) `file.gif`, ![doc.gif](http://www.dementia.org/twiki//view/doc.gif) `doc.gif`, ![image.gif](http://www.dementia.org/twiki//view/image.gif) `image.gif`, ![pdf.gif](http://www.dementia.org/twiki//view/pdf.gif) `pdf.gif`, ![ppt.gif](http://www.dementia.org/twiki//view/ppt.gif) `ppt.gif`, ![sound.gif](http://www.dementia.org/twiki//view/sound.gif) `sound.gif`, ![xls.gif](http://www.dementia.org/twiki//view/xls.gif) `xls.gif`, ![zip.gif](http://www.dementia.org/twiki//view/zip.gif) `zip.gif`, ![see.gif](http://www.dementia.org/twiki//view/see.gif) `see.gif` - Refer to an attached icon at the beginning of the bullet with: - `icon:myicon 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 [[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 `_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](http://www.dementia.org/twiki//view/empty.gif), ![dot\_udr.gif](http://www.dementia.org/twiki//view/dot_udr.gif), ![dot\_ud.gif](http://www.dementia.org/twiki//view/dot_ud.gif), ![dot\_ur.gif](http://www.dementia.org/twiki//view/dot_ur.gif), ![home.gif](http://www.dementia.org/twiki//view/home.gif) - Set ORG\_THEME = icon, 0, 16, 16, ![empty.gif](http://www.dementia.org/twiki//view/empty.gif), ![dot\_udr.gif](http://www.dementia.org/twiki//view/dot_udr.gif), ![dot\_ud.gif](http://www.dementia.org/twiki//view/dot_ud.gif), ![dot\_ur.gif](http://www.dementia.org/twiki//view/dot_ur.gif), ![home.gif](http://www.dementia.org/twiki//view/home.gif) - Set GROUP\_THEME = icon, 0, 16, 16, ![empty.gif](http://www.dementia.org/twiki//view/empty.gif), ![dot\_udr.gif](http://www.dementia.org/twiki//view/dot_udr.gif), ![dot\_ud.gif](http://www.dementia.org/twiki//view/dot_ud.gif), ![dot\_ur.gif](http://www.dementia.org/twiki//view/dot_ur.gif), ![group.gif](http://www.dementia.org/twiki//view/group.gif) - Set EMAIL\_THEME = icon, 0, 16, 16, ![empty.gif](http://www.dementia.org/twiki//view/empty.gif), ![dot\_udr.gif](http://www.dementia.org/twiki//view/dot_udr.gif), ![dot\_ud.gif](http://www.dementia.org/twiki//view/dot_ud.gif), ![dot\_ur.gif](http://www.dementia.org/twiki//view/dot_ur.gif), ![email.gif](http://www.dementia.org/twiki//view/email.gif) - Set TREND\_THEME = icon, 0, 16, 16, ![empty.gif](http://www.dementia.org/twiki//view/empty.gif), ![dot\_udr.gif](http://www.dementia.org/twiki//view/dot_udr.gif), ![dot\_ud.gif](http://www.dementia.org/twiki//view/dot_ud.gif), ![dot\_ur.gif](http://www.dementia.org/twiki//view/dot_ur.gif), ![trend.gif](http://www.dementia.org/twiki//view/trend.gif) - Set FILE\_THEME = icon, 0, 16, 16, ![empty.gif](http://www.dementia.org/twiki//view/empty.gif), ![dot\_udr.gif](http://www.dementia.org/twiki//view/dot_udr.gif), ![dot\_ud.gif](http://www.dementia.org/twiki//view/dot_ud.gif), ![dot\_ur.gif](http://www.dementia.org/twiki//view/dot_ur.gif), ![file.gif](http://www.dementia.org/twiki//view/file.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 **%TOPIC%.zip** in your twiki installation directory. Content:
File: Description:
data/TWiki/%TOPIC%.txt Plugin topic
data/TWiki/%TOPIC%.txt,v Plugin topic repository
lib/TWiki/Plugins/%TOPIC%.pm Plugin Perl module
pub/TWiki/%TOPIC%/*.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: 21 Nov 2004 (V1.032)
Change History:  
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
CPAN Dependencies: none
Other Dependencies: none
Perl Version: 5.005
TWiki:Plugins/Benchmark: [[TWiki/GoodStyle]] 97%, [[TWiki/FormattedSearch]] 98%, [[Main/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:_** [[TWikiPreferences]], [[TWikiPlugins]], TWiki:Plugins/TreePlugin -- TWiki:Main/PeterThoeny - 21 Nov 2004