This is an old revision of the document!
Table of Contents
fields plugin
Compatible with DokuWiki
2006-11-06
This plugin allows you to define “fields” in a page, which can be used anywhere 1) in the document. This can be very useful to set an author name, a reference string, or a version number for example, and use those variables anywhere in the page.
Download
The plugin can be downloaded from here: dokuwiki-fields-20080303.zip (signature). Older releases are available here.
I use Git to manage the source code, which is hosted on Gitorious. You can obtain the development version with this command :
git clone git://gitorious.org/dokuwiki-fields/dokuwiki-fields.git
Some interesting links on Git:
If you have any requests (bugs, features, etc.), please use the plugin's tracker, I don't monitor this page.
Usage
To set a field, use the following syntax:
{{fields>FIELD_NAME=FIELD_VALUE}}
where “FIELD_NAME” is the name of the field and “FIELD_VALUE” is the value (obviously :) ). Neither the name nor the value need to be uppercase, in fact they may contain any character. The field value can even contain equal signs (“=”).
To display a field, use the following syntax :
{{fields>FIELD_NAME}}
Note : This plugin supports XHTML rendering as well as ODT rendering.
Usage in ODT rendering
In OpenOffice.org, add a field in this way:
- Insert → Field → Other → Variable → User Field
- You can leave the value empty
- Add this field in your document (usually by clicking on 'insert' in the above window)
- It's done
Discussion
Feel free to contact me by mail, as I don't monitor this page. If you have any requests (bugs, features, etc.), please use the plugin's tracker.