Dark Mode

69 captures
30 Dec 2007 - 19 Jul 2023
Apr MAY Jun
12
2016 2017 2018
success
fail
About this capture
COLLECTED BY
Organization: Alexa Crawls
Starting in 1996, Alexa Internet has been donating their crawl data to the Internet Archive. Flowing in every day, these data are added to the Wayback Machine after an embargo period.
Collection: Alexa Crawls
Starting in 1996, Alexa Internet has been donating their crawl data to the Internet Archive. Flowing in every day, these data are added to the Wayback Machine after an embargo period.
TIMESTAMPS
The Wayback Machine - https://web.archive.org/web/20170512232523/http://platform.xwiki.org:80/xwiki/bin/view/Features/Programming
  1. Platform Features
  2. Programming

Programming

Last modified by Vincent Massol on 2014/01/19 19:39

Bored of simple text in your pages? Are you interested in giving life to your wiki? Then you can make use of XWiki's powerful programming API directly from your wiki pages. XWiki offers support for several scripting languages: Velocity, Groovy, Python, Ruby and even PHP.

XWiki exposes an API that allows you to manipulate the wiki and its documents easily.

To whet your appetite simply put the following code in your page:

{{velocity}}
#set($query = "where doc.parent is null or doc.parent='' order by doc.name asc")

#foreach($item in $services.query.xwql($query).execute())
#set($orphanedDoc = $xwiki.getDocument($item))
* [[$orphanedDoc.displayTitle>>$orphanedDoc]] (located in space //$orphanedDoc.space//, contains $orphanedDoc.attachmentList.size() attachments)
#end
{{/velocity}}

You'll get a list of orphaned pages (i.e. pages that have no parent). For example:

Check the Developer's Guide and especially the XWiki Scripting section to learn more.

You might also want to check out the Extensions wiki which contains a lot of code snippets that you can reuse in your pages.

Created by VincentMassol on 2006/12/12 09:29

About

Platform

Projects

Contribute

Get Connected