json toc
by toubia95
HTML
<h3>
xWiki Table des matières
</h3>
<ul>
<li>01. Introduction
<ul>
<li>011.Premiers pas</li>
<li>012.Aller plus loin</li>
<li>TestGilles</li>
</ul>
</li>
<li>02. Développement</li>
<li>03. Conclusion
<ul>
<li>toto</li>
</ul>
</li>
</ul>
<h3>
http://localhost:8080/xwiki/rest/wikis/xwiki/pages?space=Documentation&media=json
</h3>
<div id="sommaire1">
</div>
<h3>
http://localhost:8080/xwiki/rest/wikis/xwiki/spaces/Documentation/pages/WebHome/children?media=json
</h3>
<div id="sommaire2">
</div>
<h3>
http://localhost:8080/xwiki/rest/wikis/xwiki/spaces/Documentation/spaces/Introduction/pages/WebHome/children?media=json
</h3>
<div id="sommaire3">
</div>
<h3>
http://localhost:8080/xwiki/rest/wikis/xwiki/spaces?media=json
</h3>
<div id="sommaire4">
</div>
<h3>
http://localhost:8080/xwiki/rest/wikis/xwiki/pages?media=json
</h3>
<div id="sommaire5">
</div>
JavaScript
//http://localhost:8080/xwiki/rest/wikis/xwiki/pages?space=Documentation&media=json
var toc1 = {
"links": [],
"pageSummaries": [{
"links": [{
"href": "http://localhost:8080/xwiki/rest/wikis/xwiki/spaces/Documentation/spaces/Introduction/spaces/011.Premiers%20pas/pages/WebHome",
"rel": "http://www.xwiki.org/rel/page",
"type": null,
"hrefLang": null
}],
"id": "xwiki:Documentation.Introduction.011\\.Premiers pas.WebHome",
"fullName": "Documentation.Introduction.011\\.Premiers pas.WebHome",
"wiki": "xwiki",
"space": "Documentation.Introduction.011\\.Premiers pas",
"name": "WebHome",
"title": "011.Premiers pas",
"parent": "Documentation.Introduction.WebHome",
"parentId": null,
"version": null,
"author": null,
"authorName": null,
"xwikiRelativeUrl": "http://localhost:8080/xwiki/bin/view/Documentation/Introduction/011.Premiers%20pas/",
"xwikiAbsoluteUrl": "http://localhost:8080/xwiki/bin/view/Documentation/Introduction/011.Premiers%20pas/",
"translations": null,
"syntax": null
}, {
"links": [{
"href": "http://localhost:8080/xwiki/rest/wikis/xwiki/spaces/Documentation/spaces/03.%20Conclusion/spaces/toto/pages/WebHome",
"rel": "http://www.xwiki.org/rel/page",
"type": null,
"hrefLang": null
}],
"id": "xwiki:Documentation.03\\. Conclusion.toto.WebHome",
"fullName": "Documentation.03\\. Conclusion.toto.WebHome",
"wiki": "xwiki",
"space": "Documentation.03\\. Conclusion.toto",
"name": "WebHome",
"title": "toto",
"parent": "xwiki:Documentation.03\\. Conclusion.WebHome",
"parentId": null,
"version": null,
"author": null,
"authorName": null,
"xwikiRelativeUrl": "http://localhost:8080/xwiki/bin/view/Documentation/03.%20Conclusion/toto/",
"xwikiAbsoluteUrl": "http://localhost:8080/xwiki/bin/view/Documentation/03.%20Conclusion/toto/",
"translations": null,
"syntax": null
}, {
"links": [{
...