Definition list plugin

1. Description

With this DokuWiki plugin the syntax of DokuWiki is extended to allow definition lists.
<dl><dt>term</dt><dd>Term definition</dd></dl>

2. Syntax

  = Term : Definition of term.

There should be at least two spaces before ‘=’.

3. Example

  = Item 1 : Definition of item 1.
  = Item 2 : Definition of item 2.
  = : Second definition of item 2.
  = Item 3 : Definition of item 3.
  = Item 4 : 
  = Item 5 : 
  = Item 6 : Definition of items 4 through 6.

Will be rendered as HTML code:

<dl>
  <dt>Item 1</dt>
    <dd>Definition of item 1.</dd>
  <dt>Item 2</dt>
    <dd>Definition of item 2.</dd>
    <dd>Second definition of item 2.</dd>
  <dt>Item 3</dt>
    <dd>Definition of item 3.</dd>
  <dt>Item 4</dt>
  <dt>Item 5</dt>
  <dt>Item 6</dt>
    <dd>Definition of items 4 through 6.</dd>
</dl>
 

Visible in browser as:

Item 1
Definition of item 1.
Item 2
Definition of item 2.
Second definition of item 2.
Item 3
Definition of item 3.
Item 4
Item 5
Item 6
Definition of items 4 through 6.

4. Plugin

Put the following PHP file in ''/lib/plugins/definitions/syntax.php''

5. Stylesheet (optional)

Put the following css into file ''/lib/plugins/definitions/style.css'' (optional)

6. History

  • : Added all possibilities of markup to examples

7. Bugs

  • If description is empty, empty <dd></dd> block should be removed from output

8. ToDo

9. Discussion

 
dokuwiki/plugin/definitions.txt · Last modified: 2005/08/30 19:47 UTC by pavel
 
Recent changes RSS feed Creative Commons License Donate to DokuWiki author Valid XHTML 1.0 Valid CSS Driven by DokuWiki Debian served Run on Apache Powered by PHP eAccelerated