Changes for page Macros
Last modified by Jip-jan Alunkel on April 15, 18:09
From version 2.201
edited by Jip-jan Alunkel
on July 14, 01:54
on July 14, 01:54
Change comment:
Update document after refactoring.
To version 2.192
edited by Jip-jan Alunkel
on July 14, 01:37
on July 14, 01:37
Change comment:
Update document after refactoring.
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -168,19 +168,21 @@ 168 168 <option value="$doc.space">$doc.getTitle()</option> 169 169 #end 170 170 #elseif($O_elementData.select-json) 171 - #set($json = {}) 172 172 #if($O_elementData.select-json.keySet()) 173 173 #set($json = $O_elementData.select-json) 174 174 #else 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()))) 174 + #set($json = $xwiki.getDocument($O_elementData.select-json)) 175 + #set($discard = $json.setContentType('application/json')) 176 + 177 + #set($json = $jsontool.serialize($json.getContent())) 178 +$json.class.name 179 +##$jsontool.serialize($json) 180 + #set($j = $jsontool.fromString($json)) 179 179 #set($assign = "$escapetool.getHash()set($map = $j)") 180 180 #evaluate($assign) 181 181 182 182 $map.CET 183 - #set($json= $map)185 +create json from page 184 184 185 185 #end 186 186 #foreach($key in $json.keySet())