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