Changes for page Standard URL Format

<
From version
edited by Vincent Massol
on 2013/02/18
To version
edited by Oana Florea
on 2013/06/18
>
Change comment: Added documentation for the get action.

Details

Page properties
Author
 ... ... @@ -1,1 +1,1 @@ 1 -XWiki.VincentMassol 1 +XWiki.OanaTabaranu
Content
 ... ... @@ -32,13 +32,13 @@ 32 32 33 33 It can be: 34 34 35 -* /bin/: this calls the Struts servlet which will call the right action for the following part of the URL 36 -* /wiki/[wikialias]: calls the same servlet but will be used to determine the subwiki to access if ##xwiki.virtiual.usepath## is enabled in ##xwiki.cfg##. Note that you can change the "wiki" part with anything else using ##xwiki.virtual.usepath.servletpath## and by modifying web.xml to reflect the new Struts action name (see [[the URL path based wiki access>>platform:AdminGuide.AccessWiki#HTheURLpathbasedwikiaccess]] for more details) 37 -* /xmlrpc/: call xmlrpc servlet (see [[platform:Features.XMLRPC]] for more details) 38 -* /webdav/: call webdav servlet (see [[Web DAV>>platform:Features.WebDAV]] for more details) 39 -* /rest/: call REST servlet (see [[XWiki RESTful API>>platform:Features.XWikiRESTfulAPI]] for more details) 35 +* ##/bin/##: this calls the Struts servlet which will call the right action for the following part of the URL 36 +* ##/wiki/[wikialias]##: calls the same servlet but will be used to determine the subwiki to access if ##xwiki.virtual.usepath## is enabled in ##xwiki.cfg##. Note that you can change the "wiki" part with anything else using ##xwiki.virtual.usepath.servletpath## and by modifying web.xml to reflect the new Struts action name (see [[the URL path based wiki access>>platform:AdminGuide.AccessWiki#HTheURLpathbasedwikiaccess]] for more details) 37 +* ##/xmlrpc/##: call xmlrpc servlet (see [[platform:Features.XMLRPC]] for more details) 38 +* ##/webdav/##: call webdav servlet (see [[Web DAV>>platform:Features.WebDAV]] for more details) 39 +* ##/rest/##: call REST servlet (see [[XWiki RESTful API>>platform:Features.XWikiRESTfulAPI]] for more details) 40 40 41 -= Struts action (OPTIONAL) = 41 += Action (OPTIONAL) = 42 42 43 43 See the [[struts action name>>platform:Main.ShortURLs#HIII.Strutsactionname]] section for more details on how to remove this part of the url. 44 44 ... ... @@ -56,21 +56,21 @@ 56 56 57 57 The page contains wiki contents, objects/classes and attachments. 58 58 59 -If no page is specified like in the url ##http://host/xwiki/bin/view/Space/ ## the "WebHome" page name is used. 59 +When no page is specified like in the url ##http:~/~/host/xwiki/bin/view/Space/ ## the "WebHome" page name is used. 60 60 61 -= Attachment = 61 += Attachment (OPTIONAL) = 62 62 63 63 This part indicates the attachment you want to download from a particular page. 64 64 65 65 See [[platform:Features.Attachments]] for more details about attachments. 66 66 67 -= Query string = 67 += Query string (OPTIONAL) = 68 68 69 69 == Standard parameters == 70 70 71 -Some of the parameters in the URL have a "system" meaning depending of the context. 71 +Some of the parameters in the URL have a "system" meaning depending of the action. 72 72 73 -=== view mode === 73 +=== ##view## Action === 74 74 75 75 ==== xpage ==== 76 76 ... ... @@ -78,6 +78,7 @@ 78 78 ** ##raw=1##: Returns the page source as is without any formatting but XML-escaped 79 79 ** ##raw=2##: Returns the page source as is without any formatting (without any escaping) 80 80 * ##xml##: print the exported form of a document. This is what you can find in the xar for each document. 81 +* ##rev##: when specified, redirects to the ##viewrev## action (see below) 81 81 82 82 ==== outputSyntax and outputSyntaxVersion ==== 83 83 ... ... @@ -85,12 +85,22 @@ 85 85 86 86 See [[extensions:Extension.Rendering Module]] for more details on renderers. 87 87 88 -=== export mode === 89 +=== ##export## Action === 89 89 90 90 See [[platform:Features.Exports]]. 91 91 92 -== Generic == 93 +=== ##viewrev## Action === 93 93 95 +This action is the same as the ##view## action but allowing to address a given revision of the document asked. 96 + 97 +* ##rev##: the version to get, e.g. ##2.3## in ##http:~/~/host/xwiki/bin/view/MySpace/MyPage?rev=2.3## 98 + 99 +=== ##get## Action === 100 + 101 +The ##get## action should be used to render the content of the page and nothing else (mainly used for code pages). This action is similar to the ##view## action, but without the UI and with "text/plain" mime type set by default for the response. 102 + 103 +== Custom parameters == 104 + 94 94 Actions can use URL parameters to modify their action depending on their value. 95 95 96 96 For example you can make a velocity script that prints the content of this value with: