<
From version < 63.1 >
edited by Vincent Massol
on 2015/07/13
To version < 64.1 >
edited by Eduard Moraru
on 2015/07/16
>
Change comment: Documented the create action.

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.VincentMassol
1 +XWiki.enygma
Content
... ... @@ -39,6 +39,7 @@
39 39  * ##get##: Accessing Entity content (wiki, page, space, attachment, object, property, etc) without any skin applied, e.g. ##http:~/~/<server>/xwiki/bin/get/Main/WebHome?xpage=xpart&vm=commentsinline.vm##. 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.
40 40  * ##export##: Exports wiki pages to various formats (PDF, HTML, etc). See [[platform:Features.Exports]].
41 41  * ##viewrev##: This action is the same as the ##view## action but allowing to address a given revision of the document asked.
42 +* ##create##: Provides the UI for creating new documents, e.g. ##http:~/~/<server>/xwiki/bin/create/Space/NewDocument##
42 42  
43 43  == Action: ##view## ==
44 44  
... ... @@ -159,6 +159,49 @@
159 159  
160 160  If set, force the attachment to be downloaded instead of being opened in the browser (it sets the ##Content-Disposition## header to ##attachment## instead of ##inline##).
161 161  
163 +== Action: ##create## ==
164 +
165 +The additional URL paths for the create action is ##<space1>/.../<spaceN>/<page>?<query string>##.
166 +
167 +Examples:
168 +
169 + http:~/~/<server>/xwiki/bin/create/Space1/Space2/NewPage: UI for creating the Space1.Space2.NewPage document (also known as a terminal document).
170 + http:~/~/<server>/xwiki/bin/create/Space1/Space2/WebHome: UI for creating the Space1.Space2.WebHome document (which is also known as a space homepage or a non-terminal document).
171 + http:~/~/<server>/xwiki/bin/view/Main/WebHome: Generic UI for creating a new document (asking for location and document name since Main.WebHome already exists)
172 +
173 +Here are some of the supported query string parameters.
174 +
175 +=== Parameter: ##spaceReference## ===
176 +
177 +{{info}}Since 7.2M1{{/info}} A local reference string serialization of the space in which to create the new document, e.g. "Space1.Space2"
178 +
179 +__Note__: Since it's a serialized string reference, entity names need to be already escaped. For a space name "A.B", the equivalent local space reference would be "A\.B". Another example of serialized local space reference would be "A\.B.C\.D", meaning space "C.D" inside space "A.B". See the [[extensions:Extension.Model Module||Model Module]]'s documentation for more information on EntityReferences.
180 +
181 +=== Parameter: ##name## ===
182 +
183 +{{info}}Since 7.2M1{{/info}} A string representing the name of the new document, e.g. "NewDocument"
184 +
185 +=== Parameter: ##tocreate## ===
186 +
187 +Accepted values:
188 +* empty or not specified - the new document (current document if it does not exist or document specified using the spaceReference + name parameters pair) is created as a terminal document. I.e. no matter if it is Space.WebHome or Space.Page, it will create it as is, without other interpretations.
189 +* "terminal" - forces the new document to be a terminal document.
190 +** Example: If "Space1.Space2.Page" is to be created, then it is already a terminal document and is not affected in any way by this setting, but if "Space1.Space2.WebHome" is to be created then it would be a non-terminal document by default. In this later case, specifying the tocreate=terminal parameter would force the creation of a terminal document instead, result in the creation of ##Space1.Space2## (i.e. the page named "Space2" in the space "Space1"), effectively going up one level in the Nested Spaces hierarchy.
191 +** In the case of a top level space's WebHome document (e.g. "Space.WebHome"), this setting is ignored, since the top limit of the hierarchy is reached and there is nowhere else to go up. The resulting document to be created is thus "Space.WebHome".
192 +* "space" - {{warning}}Deprecated since 7.2M1{{/warning}} The document to be created will always be a space WebHome (a.k.a a non-terminal document). This value is considered only when used in conjunction with the deprecated ##space## parameter. For example: ##tocreate=space&space=MySpace## will result in "MySpace.WebHome".
193 +
194 +=== Parameter: ##space## ===
195 +
196 +{{warning}}Deprecated since 7.2M1{{/warning}} A string representing an unescaped space name where the new document will be created, Example: "MySpace", "SpaceNameWith.Dots", etc.
197 +
198 +__Note__: Because this is just a space name and not a space local reference, only top level space documents can be created, i.e. "TopLevelSpace.Document" is possible but not "TopLevelSpace.SecondLevelSpace.Document".
199 +
200 +=== Parameter: ##pageName## ===
201 +
202 +{{warning}}Deprecated since 7.2M1{{/warning}} A string representing the name of the new document. Example: "NewDocument"
203 +
204 +__Note__: When using ##tocreate=space## in conjunction with the ##space## parameter, this parameter will be ignored and the document "<space>.WebHome" will be created.
205 +
162 162  = Type: ##wiki## =
163 163  
164 164  {{info}}XWiki 7.2: Added support for Nested Spaces{{/info}}

Get Connected