Wiki source code of Extensions

Version 51.1 by Vincent Massol on 2011/11/18 12:16

Show last authors
1 {{velocity}}
2 ## This pages serves 2 purposes:
3 ## - Used by the Extension Manager UI to display the documentation link for an extension based on the Maven <url> element which are set to http://xwiki.org/documentation?id=${groupId}:${artifactId}&path=...
4 ## See http://markmail.org/thread/s5lszhwxa5e7yl5u for details
5 ## - It's displays the list of extensions (when there's no "id" request parameter)
6 ##
7 #if ("$!request.id" != "")
8 ## Locate the extension by its id
9 ## Special case, if the id is the one of the top level POM, then redirect to the main wiki
10 #if ($request.id == "org.xwiki.commons:xwiki-commons")
11 $response.sendRedirect($xwiki.getURL("xwiki:Main.WebHome"))
12 #else
13 #set ($xwql = "where doc.object(ExtensionCode.ExtensionClass).id = '$request.id'")
14 #set ($result = $services.query.xwql($xwql).execute())
15 #if ($result.size() > 0)
16 $response.sendRedirect($xwiki.getURL($result.get(0)))
17 #else
18 ## Unknown ID, list all extensions
19 {{include document="Extension.WebHome"/}}
20 #end
21 #end
22 #else
23 {{include document="Extension.WebHome"/}}
24 #end
25 {{/velocity}}

Get Connected