Wiki source code of Field Macro (Radeox)

Last modified by Vincent Massol on 2016/06/05 21:53

Show last authors
1 Allows to display object fields.
2
3 It is of little use, since the same functionality can be accomplished using the scripting API.
4
5 == Parameters definition ==
6
7 |=Name|=Optional|=Allowed values|=Default value|=Description
8 |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##
9 |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
10 |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
11
12 == Example ==
13
14 * ##{field:title}## displays the ##title## field of the first object of the type defined in the current document.
15 * ##{field:XWikiUsers.email}## displays the ##email## field of the first object of the ##XWiki.XWikiUsers## type.
16 * ##{field:XWikiComment.content|edit|3}## displays the ##content## field of the third ##XWiki.XWikiComment## type in edit mode.

Get Connected