Thxs for your advices but I didn't found a way to displayed last edited documents but
finally I edited the code to resolve my use case.
My spaceindex
{{spaceindex sort="modificationDate" count="20" /}}
displayed this nice screen now:
https://snag.gy/ia6XOZ.jpg
Imodified spaceindex macro to list all last doc (nested and terminale page) from current
space:
/bin/edit/Main/SpaceIndex?editor=object with
*****************
#if ("$!spaceMacroParam" != '')
#set ($spaceParam = $spaceMacroParam)
#end
#set ($docNames = $services.query.hql("where doc.space like ? or doc.space like ?
order by
$sortQuery").addFilter('currentlanguage').addFilter('hidden').setLimit($limit).bindValues(["${spaceParam}","${spaceParam}.%"]).execute())
#if ($docNames.size() == $limit)
##set ($docCount = $services.query.xwql('where doc.space =
:space').bindValue('space', $spaceParam).addFilter('unique').count())
#set ($docCount = $services.query.hql("where doc.space like ? or doc.space like
?").bindValues(["${spaceParam}","${spaceParam}.%"]).addFilter('unique').count())
#set ($remaining = $mathtool.sub($docCount, $limit))
#if ($remaining > 0)
(% class="documentListMore" %) (((
//Liste des $limit derniers documents $sortMessg.//
{{html}}▶{{/html}} //[[Consulter la liste
complète>>Main.SpaceIndex||queryString="space=$spaceParam"]]//
)))
#end
#end
{{html}}
#displayDocumentList($docNames false [])
*****************
and edited displayDocumentList macro in ./templates/macros.vm to add nice folder icon for
parent page:
*****************
#foreach($document in $documentList)
#if ($document.getSpace() != $previousSpace && $displaySpaces)
#if($velocityCount > 1) </ul></div></li> #end ## Close
previous space item if needed
<li class="xitem space"><div
class="xitemcontainer">${escapetool.xml($document.getSpace())}<ul
class="xlist"> ## Open new space item
#set($previousSpace = $document.getSpace())
#end
#if ($document.name == 'WebHome')
<li class="xitem space"><div
class="xitemcontainer"><a
href="$document.getURL()">${escapetool.xml($document.getPlainTitle())}</a></div></li>
#else
<li class="xitem page"><div
class="xitemcontainer"><a
href="$document.getURL()">${escapetool.xml($document.getPlainTitle())}</a></div></li>
#end
#end
#if($displaySpaces)
*****************
I haven't page and parent name with dot may be I will check my code again when I have
some (I'm too lazy)
A better fix would be to add a new sort parameter in treeview but I didn't found the
query in xwiki code.
Thxs
Pascal B
--------------------------------------------
En date de : Mer 14.12.16, Marius Dumitru Florea <mariusdumitru.florea(a)xwiki.com> a
écrit :
Objet: Re: [xwiki-users] Nested document killed {{spaceindex}} macro?
À: "XWiki Users" <users(a)xwiki.org>
Date: Mercredi 14 décembre 2016, 16h11
...
"Space"' on
http://extensions.xwiki.org/xwiki/bin/view/Extension/Query+Module#HQueryLan…
, but take into account the issue described
at
http://extensions.xwiki.org/xwiki/bin/view/Extension/Query+Module#HFindingp…
.
- replace my
target /Main/SpaceIndex?space=MySpace by ... ???
On
http://www.xwiki.org/xwiki/bin/view/ReleaseNotes/ReleaseNotesXWiki72#HFlami…
there is this mention:
"A new "children" viewer is now
accessible in the "more actions" menu,
along with the other viewers."
The URL is
/xwiki/bin/view/Path/To/Page/?viewer=children . It uses a
live
table. If you want a tree instead then
there is
http://extensions.xwiki.org/xwiki/bin/view/Extension/Children+Macro/
.
Hope this helps,
Marius
Probably I must create a custom LT to list
every sub pages