Field Macro (Radeox)
Last modified by Vincent Massol on 2016/06/05 21:53
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.