Changes for page Macros
Last modified by Jip-jan Alunkel on April 15, 18:09
From version 2.191
edited by Jip-jan Alunkel
on July 14, 01:36
on July 14, 01:36
Change comment:
Update document after refactoring.
To version 2.201
edited by Jip-jan Alunkel
on July 14, 01:54
on July 14, 01:54
Change comment:
Update document after refactoring.
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -168,26 +168,19 @@ 168 168 <option value="$doc.space">$doc.getTitle()</option> 169 169 #end 170 170 #elseif($O_elementData.select-json) 171 + #set($json = {}) 171 171 #if($O_elementData.select-json.keySet()) 172 172 #set($json = $O_elementData.select-json) 173 173 #else 174 - #set ($queryString = $escapetool.url({ 175 - 'xpage': 'plain', 176 - 'outputSyntax': 'plain' 177 - })) 178 -## #set ($json = $xwiki.getURL($O_elementData.select-json, 'get', $queryString)) 179 - #set($json = $xwiki.getDocument($O_elementData.select-json)) 180 - #set($discard = $json.setContentType('application/json')) 181 - 182 - #set($json = $jsontool.serialize($json.getContent())) 183 -$json.class.name 184 -##$jsontool.serialize($json) 185 - #set($j = $jsontool.fromString($json)) 175 + #set($jsondoc = $xwiki.getDocument($O_elementData.select-json)) 176 +## #set($discard = $jsondoc.setContentType('application/json')) 177 + #set($json = $jsontool.serialize($jsondoc.getContent())) 178 + #set($j = $jsontool.fromString($jsontool.serialize($jsondoc.getContent()))) 186 186 #set($assign = "$escapetool.getHash()set($map = $j)") 187 187 #evaluate($assign) 188 188 189 189 $map.CET 190 - createjsonfrompage183 +#set($json = $map) 191 191 192 192 #end 193 193 #foreach($key in $json.keySet())