Changes for page Extensions Wiki

Last modified by Vincent Massol on 2017/03/01 17:23

From version 49.1
edited by Thomas Mortagne
on 2011/11/03 11:46
Change comment: There is no comment for this version
To version 51.1
edited by Vincent Massol
on 2011/11/18 12:16
Change comment: There is no comment for this version

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -xwiki:XWiki.ThomasMortagne
1 +xwiki:XWiki.VincentMassol
Content
... ... @@ -1,1 +1,25 @@
1 -{{include document="Extension.WebHome"/}}
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