Wiki source code of DocumentLifecycle

Version 20.4 by Silvia Macovei on 2009/09/25

Hide last authors
Vincent Massol 13.1 1 #startfloatingbox()
Vincent Massol 1.38 2 *Contents*
Vincent Massol 13.1 3 #toc ("2" "3" "")
4 #endfloatingbox()
Vincent Massol 1.1 5
Vincent Massol 17.1 6 1 Document Lifecycle
7
Vincent Massol 16.1 8 XWiki offers to perform several actions on a document (a.k.a a page).
9
Vincent Massol 1.39 10 1.1 Create
11
12 There are two ways to create new pages:
Vincent Massol 1.40 13 * You can enter the new page name directly in the URL of your browser. For example http:\/\/locahost:8080/xwiki/bin/view/SpaceName/NoPage. If the space (<tt>SpaceName</tt> here) or page (<tt>NoPage</tt> here) don't exist then you'll get an empty page with a message saying that the page doesn't exist and there'll be a link to create it (symbolized by a question mark).
Silvia Macovei 20.4 14 * You can edit an existing page and create a link to your new page (either in Wiki mode or in WYSIWYG mode). The resulting link will show up with a question mark next to it, showing it as a nonexistent page. Simply click on the link to resolve the error, which will take you to a page with a message to create the missing page. *This is the recommended approach* as it'll allow you to create a navigation while you create new pages.
Vincent Massol 1.39 15
16 #set ($userGuideHomeDoc = $xwiki.getDocument("UserGuide.WebHome"))
17 You can watch a <a href="$userGuideHomeDoc.getAttachmentURL("linksedition_wysiwyg.swf")" target="_blank">screencast showing how to create links in the WYSIWYG editor</a>.
18
Vincent Massol 1.2 19 1.1 Edit
20
Vincent Massol 14.1 21 This allows the edition of a page. See the [page edition>Features.PageEditing] tutorial for more details.
Vincent Massol 1.2 22
Vincent Massol 1.3 23 1.1 Show
24
Vincent Massol 1.38 25 Whenever you click on a link to a page XWiki automatically shows the page in view mode. This is the default mode. XWiki also supports displaying the page in other formats that may be more adapted to specific circumstances:
Vincent Massol 1.3 26
Vincent Massol 1.38 27 #toc("3" "" "")
Guillaume Lerouge 1.35 28
Guillaume Lerouge 1.33 29 1.1.1 Code
Vincent Massol 1.3 30
Silvia Macovei 20.4 31 You can view the content of a page without having to edit it (and thus you don't have to be logged in, nor to have edit rights). You do this by moving the mouse over the Show button and selecting Code. This option is shown only for users in [Advanced Mode>Features.PageEditing#HAdvancedMode], but you can access it in [simple mode>Features.PageEditing#HSimpleMode] too by clicking directly on the Show button. For instance:
Vincent Massol 1.38 32
33 <table><tr>
34 <td>{image:code.jpg}</td>
35 <td>{image:coderesult.jpg}</td>
36 </tr></table>
37
Guillaume Lerouge 1.33 38 1.1.1 XML
Vincent Massol 1.3 39
Silvia Macovei 20.4 40 XWiki allows exposing a page in XML. This is not ordinarily useful, but it can be for example if you want to write a tool that automatically parses the content of a page. As the XML format is well-defined for all pages, this is much easier than doing screen-scrapping for example. In addition this XML format is used by XWiki for performing imports/exports of pages and whole wikis.
Vincent Massol 1.5 41
Guillaume Lerouge 1.33 42 1.1.1 Comments
43
Vincent Massol 1.38 44 Any reader can leave comments on any page. This doesn't require edit rights. For instance:
Guillaume Lerouge 1.33 45
Vincent Massol 1.38 46 {image:comments.jpg}
Vincent Massol 1.5 47
Guillaume Lerouge 1.33 48 1.1.1 Attachments
Guillaume Lerouge 1.27 49
Vincent Massol 11.1 50 A page can contain attachments. See [Attachments>Features.Attachments] for more details.
Guillaume Lerouge 1.27 51
Guillaume Lerouge 1.33 52 1.1.1 History
Vincent Massol 1.25 53
Vincent Massol 12.1 54 Displays the version history of the page. See [Version Control>Features.VersionControl] for more details.
Guillaume Lerouge 1.33 55 1.1.1 Attributes
56
57 Displays a page's properties.
58
Vincent Massol 1.38 59 #warning("The Attributes view is a work in progress")
Vincent Massol 1.25 60
Vincent Massol 1.13 61 1.1 Print
Vincent Massol 1.2 62
Vincent Massol 1.38 63 <table>
64 <tr>
65 <td>
Vincent Massol 20.1 66 There are several possible printing options (what you see may vary depending on the Skin used):
67 * Print: Calls you're browser's Print feature to print the current page
68 * Print Preview: Generates a page which is formatted so that it can be easily printed using your browser's Print feature.
Vincent Massol 20.2 69 * PDF, RTF, XAR, HTML exports: See the [Export feature>Features.Exports] for more information.
Vincent Massol 1.38 70 </td>
Vincent Massol 20.2 71 <td>{image:export.png|document=Features.Exports}</td>
Vincent Massol 1.38 72 </tr>
73 </table>
74
Vincent Massol 1.2 75 1.1 Delete
76
Vincent Massol 1.38 77 Removes a page. A confirmation is asked before the removal is done. This option is non reversible so be very careful when you use it.
Vincent Massol 1.15 78
Vincent Massol 1.38 79 {image:delete.jpg}
Guillaume Lerouge 1.33 80
81 1.1 Copy
82
Vincent Massol 18.1 83 It is possible to create a copy of an existing page. To do so, you need to do a [search>code:Applications.SearchApplication] with Admin Rights using the title of the page you want to copy. You will then see a "copy" next to the page you want to copy.
Guillaume Lerouge 1.33 84
Vincent Massol 1.38 85 After clicking on it you will be prompted to enter the location of the page you want to copy (that is, "where should the page be copied?"). Click on "copy" and you're done!
Guillaume Lerouge 1.33 86
Vincent Massol 1.38 87 {image:XWikiCopy.png}
Guillaume Lerouge 1.33 88
Vincent Massol 20.3 89 1.1 Move/Rename
Guillaume Lerouge 1.27 90
Vincent Massol 1.38 91 #info("The Rename feature is available only for version 1.0 Beta 6 and following of XWiki")
Guillaume Lerouge 1.27 92
Silvia Macovei 20.4 93 A rename feature is available in XWiki. Its effect is to change the page name (that is, you get http://\<server\>/xwiki/bin/View/NewSpace/NewPageName instead of http://\<server\>/xwiki/bin/View/OldSpace/OldPageName) and all the backlinks linking to it. This means that you can easily move a page from one space to another, as well as keep them evolving with your wiki.
Guillaume Lerouge 1.27 94
Vincent Massol 19.2 95 You can access the rename feature for a page by clicking on "Rename" in the top menu bar. For example with XWiki Enterprise 1.2, that option is in the "Action" menu:
Vincent Massol 19.3 96
Vincent Massol 1.38 97 {image:TopBarRename.png}
Guillaume Lerouge 1.27 98
Vincent Massol 1.38 99 Once this is done, you will be prompted to input the new Space and Page name you want your document to take:
Vincent Massol 19.3 100
Vincent Massol 1.38 101 {image:RenameInput.png}
Guillaume Lerouge 1.27 102
Vincent Massol 1.38 103 Now you can link to the page using its new name.
104
105 As of XWiki 1.0 Beta 6 there are some known limitations:
Vincent Massol 19.4 106 * backlinks have to be turned on (they are turned on by default but if you have turned them off, rename will not rename backlinks and you'll have to turn them on again to benefit from this feature)
107 * backlinks in objects attached to pages are not currently renamed. You can track issue [XWIKI-981>http://jira.xwiki.org/jira/browse/XWIKI-981] to follow the progress.
108 * backlinks are saved when a page is saved thus it may happen with a clean XWiki database that backlinks are not saved. In this special case, you can call the following in a page to refresh all links (you'll need to be admin to do this):
Vincent Massol 1.38 109 {code}
Vincent Massol 1.41 110 $xwiki.refreshLinks()
Vincent Massol 1.38 111 {code}
Guillaume Lerouge 1.31 112

Get Connected