Extensions Wiki » Extensions » Model Module

Changes for document Model Module

Last modified by Thomas Mortagne on 2013/05/29 17:42
From version 13.1
edited by Oana Tabaranu
on 2012/05/31 14:29
To version 14.1
edited by Vincent Massol
on 2012/05/31 14:31
Change comment: Move script service example to script service section

Metadata changes

Document author
xwiki:XWiki.OaVinaTabaracenutMassol

Object changes

Object number 0 of type ExtensionCode.ExtensionClass modified

Description
... ... @@ -81,11 +81,6 @@
81 81 {{/code}}
82 82 )))
83 83
84 -* Generate a string representation for the parent reference relative to the current document:((({{code}}
85 -#set($parentReference = $services.model.resolveDocument($doc.parent, 'currentmixed', $doc.documentReference))
86 -$services.model.serialize($parentReference)
87 -{{/code}}))
88 -
89 89 === Attachment References ===
90 90
91 91 General Syntax: {{code language="none"}}Wiki:Space.Page@Filename{{/code}}
... ... @@ -122,3 +122,12 @@
122 122 * ##Object.Property## (wiki, space, page not defined, it's a relative reference)
123 123 * ##Property## (wiki, space, page and object not defined, it's a relative reference)
124 124 * ##Pro\.perty## (object name with a dot in the name which needs to be escaped as otherwise "Pro" would be considered as an object name)
120 +
121 +== Script Service API ==
122 +
123 +Examples:
124 +
125 +* Generate a string representation for the parent reference relative to the current document (example in Velocity):((({{code}}
126 +#set($parentReference = $services.model.resolveDocument($doc.parent, 'currentmixed', $doc.documentReference))
127 +$services.model.serialize($parentReference)
128 +{{/code}}))

Download XWiki