It's better when it's simple

User Tools

Site Tools


fields Plugin

Compatible with DokuWiki

  • 2017-02-19 "Frusterick Manners" unknown
  • 2016-06-26 "Elenor Of Tsort" yes
  • 2015-08-10 "Detritus" unknown
  • 2014-09-29 "Hrun" unknown

plugin Allows storage and retrieval of user-defined fields throughout the page

Last updated on

Similar to data, easyvar, kixovar, macros, replace, textinsert

Tagged with meta, odt, replace

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.


The plugin can be downloaded from here: Older releases are available here.

I use Git to manage the source code, which is hosted on Github. You can obtain the development version with this command :

git clone

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.


To set a field, use the following syntax:


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 :


Note : This plugin supports XHTML rendering as well as ODT rendering.

Usage in ODT rendering

In, 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 :-)


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.


Writes directly HTML code

The content of the “fields” seems to be directly output as HTML-Code2), i.e.

  • you cannot use any DokuWiki formatting in field content
  • you can use nearly any HTML directive in field content - from simple font style as italic to :!: Script Code3)

The latter opens the usual question bug or feature: for my purposes in a “super-closed” wiki (only approved users can even read the wiki and not all of them can edit everything) it may be a benefit in some cases while especially in open wikis (anonymous people can edit) it is a security hole - but @Aurélien: please do NOT retract this wonderful tool

hh lohmannhh lohmann

2014/01/10 09:10

If this is true (also haven't checked the code yet), then this should be properly reported and a securityissue be added to the plugin's data. — Anika HenkeAnika Henke

2014/01/14 01:37

Fields of Application

(note: the same term “fields” here reveals to be pure coincidence!)

Multiple use of same token

As stated in the main description: If you have the same information at many places, you can maintain (change) it centrally by using a field.

:-P You may also span this over pages by including field definitions via plugin:include.

hh lohmannhh lohmann

2014/01/10 09:17

Separation of presentation and content

The fields allow a clear and concise maintenance of data since you can access the fields' content totally apart from its presentation - vice versa you can maintain complex presentation layouts since being not intermingled with data maintenance concerns (see also Separation of presentation and content).

:-P In conjunction with plugin:include you can drive this further by applying (via including) a uniform and centrally (and so separately) maintained template to “local” data.

Hint: compare this to's uniform plugin description pages via plugin:repository

hh lohmannhh lohmann

2014/01/10 09:17

it doesn't appear to work in headings, not in DATA plugin
I have not looked into the plugin's code yet
only HTML based, i.e. Javascript etc. via <SCRIPT>, no PHP or something via <?..?>
plugin/fields.txt · Last modified: 2016-09-14 20:43 by LarsDW223