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
on 2011/11/03 11:46
Change comment:
There is no comment for this version
To version 52.1
edited by Vincent Massol
on 2012/02/12 14:56
on 2012/02/12 14:56
Change comment:
There is no comment for this version
Summary
-
Page properties (2 modified, 0 added, 0 removed)
Details
- Page properties
-
- Author
-
... ... @@ -1,1 +1,1 @@ 1 -xwiki:XWiki. ThomasMortagne1 +xwiki:XWiki.VincentMassol - Content
-
... ... @@ -1,1 +1,27 @@ 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 + ## Remove the part after ":::" (see top level pom.xml source for explanation as to why) 9 + #set ($id = $stringtool.substringBefore($request.id, ":::")) 10 + ## Locate the extension by its id 11 + ## Special case, if the id is the one of the top level POM, then redirect to the main wiki 12 + #if ($id == "org.xwiki.commons:xwiki-commons") 13 + $response.sendRedirect($xwiki.getURL("xwiki:Main.WebHome")) 14 + #else 15 + #set ($xwql = "where doc.object(ExtensionCode.ExtensionClass).id = '$id'") 16 + #set ($result = $services.query.xwql($xwql).execute()) 17 + #if ($result.size() > 0) 18 + $response.sendRedirect($xwiki.getURL($result.get(0))) 19 + #else 20 + ## Unknown ID, list all extensions 21 + {{include document="Extension.WebHome"/}} 22 + #end 23 + #end 24 +#else 25 + {{include document="Extension.WebHome"/}} 26 +#end 27 +{{/velocity}}