
Wiki Portlet
Table of Contents [-]
Introduction #
Liferay includes in its bundle a portlet that allows creation of contents in the Wiki collaboration style. The Wiki Wiki concept was invented by Ward Cunningham and has seen since then lots of different implementations.
Nodes #
Liferay allows the organization of pages in groups called nodes. Each node acts as a whole wiki with its own set of permissions, recent changes list and listing of all pages.
With the introduction of the new permissions system in Liferay 4, the Wiki was gained a very powerful functionality that allows you either to use the wiki in the traditional way (open to anyone) or use it also as a tool to organize private information to certain organizations, locations or groups of people.
A node is created by clicking on the Add node button and filling the title and optionally the description. After creating a node an initial page called FrontPage is automatically created and can be edited clicking on the 'Edit Page' link in the bottom of the wiki window.
To create new pages you have to edit an existing page and use the CamelCase syntax as described next to create a link to the new page. Until the page is created instead of being converted to a link, the name of the new page will be preceeded by a question mark. Clinking on the question mark will create the page. Once it is created the page can be edited regularly and its name on the originating page will be converted to a link. Please note : This does not work inside the HTML Editor.
Editing modes #
Liferay wiki comes with three editing modes: Creole, HTML, and Classic.
Creole #
Creole was a syntax that came about through a growing dissatisfaction in the Wiki community of a non-standard language. Headed by Ward Cunningham, who invented the Wiki technology with C2, the Creole design team believed that "... markup should be easy to learn and easy to teach, as well as fast to type and should use readable markup which is non-destructive" (see article).
Creole syntax has been added into the suite of Wiki languages supported by Liferay since version 5.0. Some examples of its basic syntax include:
Text Styles
//italics// **bold**
Headers
== Large heading == === Medium heading === ==== Small heading ===
Links
[[Link to a page]] [[http://www.liferay.com|Link to website]]
Lists
* Item ** Subitem # Ordered Item ## Ordered Subitem
Images
{{attached-image.png}} {{Page Name/other-image.jpg|label}}
In-line CSS injection(Note: this is not officially part of the Creole 1.0 specification, but it works because Liferay's wiki is based on the JSPWiki engine. Used it only if you absolutely must)
%%(color:red) red%% %%(color:blue)blue%% %%(color:green)green%%
%%(color:red) red%% %%(color:blue)blue%% %%(color:green)green%%
%%(text-align:center) **This line is centered** %%
%%(text-align:center) This line is centered %%
Tables with more complex CSS injection:
||%%(text-align:left;display:block;)Left Heading%% ||%%(text-align:center;display:block;)Center Heading%% (break added for readability) ||%%(text-align:right;display:block;)Right Heading%% |%%(text-align:left;display:block;)Left Cell 11%% |%%(text-align:center;display:block;)Center Cell 12%% (line break added for readability) |%%(text-align:right;display:block;)Right Cell 13%% |%%(text-align:left;display:block;)Left Cell 21%% |%%(text-align:center;display:block;)Center Cell 22 (line break added for readability) (longer for illustration)%% |%%(text-align:right;display:block;)Right Cell 23%% |%%(text-align:left;display:block;)left%% |%%(text-align:center;display:block;)center%% (line break added for readability)|%%(text-align:right;color:red;display:block;)combine alignment and color%%
%%(text-align:left;display:block;)Left Heading%% | %%(text-align:center;display:block;)Center Heading%% | %%(text-align:right;display:block;)Right Heading%% | |||
%%(text-align:left;display:block;)Left Cell 11%% | %%(text-align:center;display:block;)Center Cell 12%% | %%(text-align:right;display:block;)Right Cell 13%% | |||
%%(text-align:left;display:block;)Left Cell 21%% | %%(text-align:center;display:block;)Center Cell 22 (longer for illustration)%% | %%(text-align:right;display:block;)Right Cell 23%% | |||
%%(text-align:left;display:block;)left%% | %%(text-align:center;display:block;)center%% | %%(text-align:right;color:red;display:block;)combine alignment and color%% |
Other
<<TableOfContents>> {{{ Preformatted }}}
For full syntax rules can be found at the Creole 1.0 spec.
HTML #
In this mode the text area incorporates an embedded HTML editor (by default FCKEditor) that allows the user to write the document in a WYSIWYG similar to how they work in Ms Word or Open Office (although somewhat more limited, of course).
Please note: When switching back and forth from Creole to HTML the format will not be converted automatically. You'll have to do it manually.
Classic #
The classic editing mode is the most usual for wikis and uses text conventions to format the text. The text is later converted to HTML to be presented. Liferay uses the Friki engine to do this conversion. It's syntax is described in:
This syntax is inspired and pretty much the same to that of the original Wiki. Documentation about that syntax can be found in:
Links are created by writting two or more words together (without spaces between them) and uppercasing the first letter of each of the words. This is known as CamelCase syntax.
LinkExample
To create monospaced text write a blank or more spaces at the beginning of the line
{{{ This would be converted to monospaced font}}}
To write italics put two single quotes at the beginning and at the end of the text
{{{''italics''}}}
To write bold put three single quotes at the beginning and at the end of the text
{{{'''bold'''}}}
Four dashes by themselves on a single text line create an horizontal line
----
Classic (Enhanced in 4.3.1+) #
While awaiting the integration of an alternative wiki engine (as has been discussed and often requested), we've made a few changes for the 'Classic Wiki' mode such that it's usability and familiarity should be much greater.
Instead of going the 'Classic Wiki' syntax direction, we've taken this 'Enhanced' version in the MediaWiki direction.
Here is a snapshot of the rules as they are now:
Added Media Wiki style internal links
[ Page Name | Link Text ]
Features not shown are the same as they were.
References #
Image Gallery is one of Liferay's Out of The Box Portlets