I didn't found equivalent of {{spaceindex sort="modificationDate"
count="20" /}} then I must modify hql query in:
/bin/edit/Main/SpaceIndex?editor=object
but I failed too too! :-(
I would to list all documents (terminale page and child space) under a root space, the i
use this query :
#set ($docNames = $services.query.hql("from XWikiSpace as space where doc.space =
space.reference and ((doc.space like ? )) order by
$sortQuery").addFilter('currentlanguage').addFilter('hidden').setLimit($limit).bindValues([${spaceParam}]).execute())
- $spaceParam is my root Space
- $sortQuery = 'doc.contentUpdateDate desc'
but the query displayed this error:
Caused by: org.hibernate.hql.ast.QuerySyntaxException: Invalid path: 'doc.space'
[from com.xpn.xwiki.doc.XWikiSpace as space where doc.space = space.reference and
((doc.space like ? )) order by doc.contentUpdateDate desc]
Thxs.
(I didn't found the query of Document Tree in source code either)
Pascal B
--------------------------------------------
En date de : Jeu 8.12.16, Pascal BASTIEN <pbasnews-xwiki(a)yahoo.fr> a écrit :
Objet: Nested document killed {{spaceindex}} macro?
À: "XWiki Users" <users(a)xwiki.org>
Date: Jeudi 8 décembre 2016, 18h18
Hello,
With my xwiki7.0.1 to 8.4 upgrade process, I noticed that
all my WebHome on spaces (with dashboard+{{spaceindex}}
macro) are "broken".
After a little bit of search, I understood that spaceindex
macro list only direct children terminal page...
In some different post from dev list, it seem that I must
use {{documentTree}} macro instead.
My spaces dashboard use
{{spaceindex sort="modificationDate" count="20" /}}
to list the 20 more recents page and I added a shortcut to
/bin/view/Main/SpaceIndex?space=MySpace (broken too:-( )
Could you give me some advices how can I replace my
"spaceindex" to:
- list the 20 more recents page (terminale and none
terminale) on current space?
I didn't found a "modificationDate" sorting parameter in
{{documentTree}}
- replace my target /Main/SpaceIndex?space=MySpace by ...
???
Probably I must create a custom LT to list every sub pages
Finaly, may be a caution text must be added on this page:
http://extensions.xwiki.org/xwiki/bin/view/Extension/SpaceIndex+Macro
(ie "don't use this macro anymore with nested page!" or
"list only direct children terminal page ")
Thxs for your help.
Pascal BASTIEN