To write your own layout you're gonna need few new jsp pages.
They are:
Wiki.jsp
Edit.jsp
PageInfo.jsp
they are all situated in jbosswiki/fore-wiki/src/web/WEB-INF/jsp
Atributes
There are some attributes you can (or you have to) use, to show apropriate content
Attribute | Type | What is it? |
---|---|---|
actionURL | String | Action url passed from portlet. Use it to prepare links. |
wikiName | String | Name of the whole Wiki. Just to show header. |
wikiContent | String | Content of a page to show. |
wikiPage | String | Name of the showing page. |
defaultPage | String | Name of the default page. |
friendlyLink | String | Friendly link of current page ex. http://host.domain/wiki/PageName |
rssLink | String | Link to RSS feed. |
rdfLink | String | Link to RDF feed. |
atomLink | String | Link to ATOM feed. |
type | String | WikiType to show. |
editDate | java.util.Date | Edit date of current page to show. |
author | String | Name of the author of current page to show. |
wikiImagesUrl | String | Link to images showed in Wiki (for wiki buttons, logo etc.). |
isAdmin | boolean | If loged in user is admin. |
isViewable | boolean | If page is viewable by current user (only for showing info). |
isEditable | boolean | If page is editable by current user (only for showing info). |
logedIn | boolean | If user is guest or is loged in. |
fileAttach | boolean | Wheather to show attachment upload form or not. |
showedVersion | Integer | Number of current version. |
errorMsg | String | Error message (if any) to show. |
pageAtTop | org.jboss.wiki.WikiPage | only PageInfo.jsp page to show info about (sorry - logic inside JSP). |
editSessionId | String | only Edit.jsp id of current edit session (needs to be passed back while Canceling or Saving page). |
Attaching files
For file attachmnet you have to create a form:
what is important - names and values have to have those values or file uploading won't work.
Submiting new page
Your form have to send those values:
page content</textarea>
<input type="hidden" name="editedPage" value="page name" />
<input type="hidden" name="page" value="name to show after saving current page - probably same page" />
<input type="hidden" name="editSessionId" value="edit session id (passed in attribute)" />
Be careful while creating Save/Cancel buttons. editSessionId is also mandatory.
Comments