H Frederik,

On 14 Jun 2015 at 20:43:39, Tebert, F., SNL IT PeP, 1200, BN 
(frederik.teb...@deutschepost.de(mailto:frederik.teb...@deutschepost.de)) wrote:

> Hi All,
>  
> I have a problem using the PDF-Export feature within XWiki. Using the 
> includechilds option I am exporting all pages within one space. This should 
> be done using an alphabetic sort order. But apparently the sort order is 
> different. Maybe it's the creation date?
>  
> Does someone know how this works and where I can change the sort order for 
> PDF-Export with multiple pages (including the ToC feature)?

If you check 
http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Configuration#HCustomizingthePDFexportLook26Feel
 you can see that the file containing the code is pdf.vm

I’ve checked this file and when includechilds is used it calls 
#includeChildren() from macros.vm which calls Document.getChildren(). I’ve read 
that code’s impl and it does this:

            Query query = getStore().getQueryManager().createQuery(
                "select distinct doc.space, doc.name from XWikiDocument doc 
where "
                    + "doc.parent=:prefixedFullName or doc.parent=:fullName or 
(doc.parent=:name and doc.space=:space)",
                Query.XWQL);

As you can see there’s no sort in that query, which means the documents will be 
returned in the other in which they’ve been added to the DB AFAIK.

If you wish to have a sort order you should file a jira issue for that at 
http://jira.xwiki.org (or customize your pdf.vm but I think what you’re asking 
is a valid use case which could benefit the product).

Thanks
-Vincent

> Thanks and with best regards,
> Frederik
_______________________________________________
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to