[xwiki-users] sorting of space index macro
hi all, id like to use the Space-Index macro to list all pages on the WebHome page of every Space. With {{spaceindex count="0"/}} i get a list which is sorted by the time the page was created (or last modified?), but i'd like a list which is sorted in alphabetical order. Is that possible? thanks in advance, zae.
Hi!
________________________________________ From: [email protected] [[email protected]] On Behalf Of Account [[email protected]] Sent: 11 May 2012 11:03 To: [email protected] Subject: [xwiki-users] sorting of space index macro
hi all, id like to use the Space-Index macro to list all pages on the WebHome page of every Space. With {{spaceindex count="0"/}} i get a list which is sorted by the time the page was created (or last modified?), but i'd > like a list which is sorted in alphabetical order. Is that possible? thanks in advance, zae.
I'm not sure to understand you. Please, check this... http://www.xwiki.org/xwiki/bin/view/Main/SpaceIndex It gots a list sorted in alphabetical order. HTH! Ricardo
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
Nota: A informaci?n contida nesta mensaxe e os seus posibles documentos adxuntos ? privada e confidencial e est? dirixida ?nicamente ? seu destinatario/a. Se vostede non ? o/a destinatario/a orixinal desta mensaxe, por favor elim?nea. A distribuci?n ou copia desta mensaxe non est? autorizada. Nota: La informaci?n contenida en este mensaje y sus posibles documentos adjuntos es privada y confidencial y est? dirigida ?nicamente a su destinatario/a. Si usted no es el/la destinatario/a original de este mensaje, por favor elim?nelo. La distribuci?n o copia de este mensaje no est? autorizada. See more languages: http://www.sergas.es/aviso_confidencialidad.htm
On 05/11/2012 05:03 AM, Account wrote:
hi all, id like to use the Space-Index macro to list all pages on the WebHome page of every Space. With {{spaceindex count="0"/}} i get a list which is sorted by the time the page was created (or last modified?), but i'd like a list which is sorted in alphabetical order. Is that possible? thanks in advance, zae.
Well, it seems that the space index macro has a hard-coded ordering on the creation date. You can change that in the source code of the macro: - edit Main.SpaceIndex in the object editor /xwiki/bin/edit/Main/SpaceIndex?editor=object&classname=XWiki.WikiMacroClass - in the "Macro code" field of the XWiki.WikiMacroClass object, find the line: #set ($docNames = $xwiki.searchDocuments('where doc.space=? order by doc.creationDate desc', $limit, 0, [${spaceParam}])) and replace it with: #set ($docNames = $xwiki.searchDocuments('where doc.space=? order by doc.name', $limit, 0, [${spaceParam}])) - save, and it should order by name now. -- Sergiu Dumitriu http://purl.org/net/sergiu/
participants (3)
-
Account -
Ricardo.Julio.Rodriguez.Fernandez@sergas.es -
Sergiu Dumitriu