Field Macro
This is a Radeox macro, bundled with all the XWiki products by default.
Macro developed by the XWiki Development Team.
This macro cannot currently be downloaded separately.
Macro developed by the XWiki Development Team.
This macro cannot currently be downloaded separately.
Field Macro
The field macro allows to display object fields. It is of little use, since the same functionality can be accomplished using the scripting API.Parameters definition
| Name | Optional | Allowed values | Default value | Description |
|---|---|---|---|---|
| text | false | a valid field name, eventually prefixed with a classname | The name of the field to display. It can be prefixed with the short name of a class in the "XWiki" space, otherwise the name of the current document is assumed to be the target class. For example: email or XWikiUsers.email, but not XWiki.XWikiUsers.email | |
| mode | true | view, rendered, edit, search, hidden | the current default display mode "edit" for inline editing, "view" for the rest | The display mode, one of the modes supported by the $doc.display method |
| id | true | existing object index | first object of the specified type found in the current document | The index of the target object of the specified type |
Example
- {field:title} displays the title field of the first object of the type defined in the current document.
- {field:XWikiUsers.email} displays the email field of the first object of the XWiki.XWikiUsers type.
- {field:XWikiComment.content|edit|3} displays the content field of the third XWiki.XWikiComment type in edit mode.