|
Wiki
You are reading the AEM 5.6 version of Wiki.
This documentation is also available for the following versions:
CQ 5.5
CQ 5.4
CQ 5.3
Note
Wiki is deprecated as of AEM and may be removed from a future release.
A wiki is a web site where any users with access can collaborate and edit the web site directly using a simplified markup language. You create and modify wiki topics in a simple markup language within a web browser.
In AEM, a single wiki page is called a topic and a collection of topics is called a wiki space. You can create multiple wiki spaces. Permissions determine who can read or change the content of the wiki space. You can search across a wiki space as well as create topics on the fly. In addition, you can add attachments to wiki topics.
This section describes wiki concepts and describes how to use the provided wiki functionality.
To add a wiki to your website, simply go to the Website Console and copy the Wiki Content (/content/wiki) to the location in your site structure where you want to start the new wiki space.
- Open the Websites Console.
- Copy the Wiki Content structure from /content/wiki to where you want to create a wiki.
- Rename the newly created wiki space by changing its title as appropriate.
- Open the main page of the newly created wiki.
After you create a wiki space you can edit the main topic (or any new topics you may have created).
- In the Websites Console, navigate to the page where you have started your wiki.
- Click the Edit tab and edit the wiki page, using the wiki syntax for simple formatting.
- You can switch between Wysiwyg and Wiki text edit mode by clicking Convert to Wysiwyg/WIKI-text in Advanced Operations. Both edit modes provide formatting shortcuts.
- Optionally, in the topic title field you can enter a new name for the topic. If you do not type a name, the title will automatically be used as topic name for this wiki page.
- Click Save to persist your changes or, to save the page without notifying subscribed users of the change, click Quiet Save. Click Preview to see what your page looks like before saving (all changes are saved in the wiki page's history).
After you create a wiki space you can also create new topics by either:
You can delete wiki topics and spaces by either entirely removing them from the system or archiving them in the attic.
To delete a wiki topic or space:
- Navigate to the wiki topic that you want to delete.
- Click the Edit tab.
- Below the textarea, under Advanced Operations, click Delete. AEM requests confirmation that you want to delete and recommends that you archive the topic in the attic.
- To move the topic to the attic, click Delete. To delete the page entirely, clear the Attic check box and click Delete. You can also click Cancel to keep the topic.
Renaming and/or moving wiki topics
To rename or move a wiki topic:
- Navigate to the wiki topic that you want to rename or move.
- Click the Edit tab.
- Below the textarea, under Advanced Operations, click Move/Rename.
- To change the name of the topic, type a new name in the New Name field.
- To move a topic, select a new parent from the New Topic Parent list. To move subtopics with the main topic, select the Move subtopics check box.
- Click Rename to make the change. If you make a mistake, you can click Reset to revert to current settings or click Cancel to close the Rename page.
Modifying topic properties
To modify topic properties:
- Navigate to the wiki topic that you want to modify properties for.
- Click the Edit tab.
- Below the textarea, under Advanced Operations, click Edit topic properties.
- Make changes to the topic properties and click Apply to save them or Cancel to ignore them. See Environment Variables for information on how to use and include environment variables in topic pages.
Adding attachments to topics
To add an attachment to a topic:
- Navigate to the wiki topic that you want to attach files to.
- Click the Attachments tab.
- Click Browse to upload a local file.
- If you want the attachments to be listed on the topic page, select the check box in Display Options.
- If you want to create a link to the attached file, select the check box in the Attach new file.
- Click Upload to upload the attachment.
To view changes made to a particular wiki topic:
- Navigate to the wiki topic that you want to view the history for.
- Click the History tab. AEM displays any changes that were made to the topic and saved.
Subscribing to and unsubscribing from topics
To subscribe to a topic whenever changes are made:
- Navigate to the wiki topic you want to subscribe to.
- Click the History tab.
- Click the subscribe to this topic link. If you are subscribed to a topic, the link changes to unsubscribe from this topic. Click the link to unsubscribe.
The following section describes wiki syntax, including the following:
Simple formatting includes the commands you need to format your wiki text.
For a new paragraph, just insert an empty line. So this is on a new paragraph. For an explicit\\ line break, add two {{\\}}.
displays as:
For a new paragraph, just insert an empty line.
So this is on a new paragraph. For an explicit
line break, add two \\.
This is **bold text**.
displays as:
This is bold text.
This is //italic text//.
displays as:
This is italic text.
This is __underlined text__.
displays as:
This is underlined text.
This is --deleted text--.
displays as:
This is deleted text.
Superscript and Subscript
Water is also known as H,,2,,O. Einstein says: E = mc^^2^^.
displays as:
Water is also known as H2O.
Einstein says: E = mc2.
This is ((small text)).
displays as:
This is small text.
Please delete the file ==test.bak==.
displays as:
Please delete the file test.bak.
This is **//bold and italic text//**. Einstein says: ==**e = mc^^2^^**==.
displays as:
This is bold and italic text.
Einstein says: e = mc2.
This is a {{{single **line** escape}}} {{{ And this **is** a multiline __escape__. }}} Further, a tilde ~~ escapes all special formattings, like ~**bold~** or ~WikiWords.
displays as:
This is a single **line** escape
And this **is** a multiline __escape__.
Further, a tilde ~ escapes all special formattings, like **bold** or WikiWords.
If you use the multiline escaping mentioned previously ({{{...}}}), the output is a simple <pre>...</pre> with no special style.
If you want to display a code example, use the @@ formatting. This generates a <pre><code>...</code></pre> block with a box around it. For convenience, the first linefeed after the @@ marker is removed from the output.
public int hashCode() { int h = hash; if (h == 0) { int off = offset; char val[] = value; int len = count; for (int i = 0; i < len; i++) { h = 31*h + val[off++]; } hash = h; } return h; } @@ with preceeding whitespaces, does not close this block.
If the @@ pair is on a single line, the <pre> is omitted:
Example: In java, @@System.out.println("Hello, world");@@ outputs ==Hello, world== on the console.
displays as:
Example: In java, System.out.println("Hello, world"); outputs Hello, world on the console.
If you just need a box, use the @@@ formatting.
@@@ This example is surrounded by a box,\\ that also can span multiple paragraphs. @@@
displays as:
This example is surrounded by a box,
that also can span
multiple
paragraphs.
Lines with starting > characters are blockwise indented: > This is indented once, >> and this is indented twice, >>> and so on... > Of course this is properly nested. : Alternatively, you can use colons ":" for :: indentation.
displays as:
Lines with starting > characters are blockwise indented:
This is indented once,
and this is indented twice,
and so on...
Of course this is properly nested.
Alternatively, you can use colons ":" for
indentation.
To insert a horizontal rule, just put 3 or more dahes on a single line: ---
displays as:
This section describes the various ways you can link in the wiki including using WikiWords, internal linking, external linking, and anchors. Images and images with links are also described.
The easiest way to link topics is to use WikiWords. WikiWords must start with an uppercase letter and then have either consecutive uppercase letters terminated with a lowercase letter or have a "camelcase" letter, that is, they have intercaps. Numbers count as both lower- and uppercase letters.
Valid Wiki Words:
- TestCase
- TESTCase
- TestCase1
- CQ355
- Test1
Not Wiki Words:
- testcase
- TEST
- Testcase
- cq355
- com.day.wiki.parser.Test.Case
- No
You can escape WikiWords by either preceeding them with a ~ or an !. If you need an ! before a wiki word, you need to escape it.
~NoLinking or !NoLinking. But ~!YesLinking.
displays as:
NoLinking or NoLinking. But !YesLinking.
If the name of a topic is not a wiki word, you can explicitly link to it, using the link markup. There are alternative link markup styles to comply with most of other wiki syntaxes. Internal links can also contain a WikiSpace reference.
This links [to_here].
This links [[to_here]].
This links to another space [Sandbox.TestTopic].
This links [to_here|Here].
This links [[to_here|Here]].
This links [[to_here][Here]].
displays as:
To create an anchor, preceed a word by a # sign.
In the [#Anchor1|section] mentioned below...
#Anchor1 The section with the anchor.
displays as:
Note
All headings automatically create an anchor tag by mangling the characters of their heading text. View the generated html in order to retrieve the exact label.
External links follow the same syntax as internal ones. just use a full qualified URL or an absolute path to a resource.
Welcome to [http://www.day.com|DAY].
Click [/admin|here] for the servlet engine console.
displays as:
Use double curly brackets to specify an image source.
Smiley: {{smiley.jpg}}
Image with alt text: {{corrupt.jpg|Corrupt Image}}
displays as:
Consequently, you can use images in links:
Click here for a smile [http://en.wikipedia.org/wiki/Smile|{{smiley.jpg}}]
displays as:
Sent mail to [mailto:sheriff@day.com].
Sent mail to [mailto:sheriff@day.com|the sheriff.]
displays as:
Sent mail to sheriff@day.com.
Sent mail to the sheriff.
This section describes the syntax for ordered, unordered, and definition lists.
Unordered list items start with consecutive asterisks * followed by a whitespace. The number of asterisks indicate the indentation level. Preceeding whitespaces are ignored and can be used to indent the lists nicely in wiki-text. To create a multiline item, use the linebreak \\ markup.
* List Item Level 1 * List Item Level 1 ** List Item Level 2 *** List Item Level 3\\ This continues on the 2^^nd^^ line. *** List Item Level 3 @@ Some sample code that lives inside the list. @@ *** List Item Level 3 * List Item Level 1
- List Item Level 1
- List Item Level 1
- List Item Level 1
Ordered lists work the same way as unordered lists, but they use the hash # character for indentation. Ordered and unordered lists can also be combined.
# Item 1
# Item 2
## Item 2.1
## Item 2.2
### Item 2.2.1
**** Unordered Item
**** Unordered Item
# Item 3
- Item 1
- Item 2
- Item 2.1
- Item 2.2
- Item 2.2.1
- Unordered Item
- Unordered Item
- Item 3
Definition list terms start with a semicolon ; followed by a colon : followed by the definition.
; Coffee : Black hot drink ; Milk : White cold drink
displays as:
- Coffee
- Black hot drink
- Milk
- White cold drink
Headings start with consecutive equal = characters. The number of characters specify the heading level. Closing equal characters are nice but unnecessary. Alternatively you can use TWiki syntax. If the heading markup is directly followed by 2 !!, the heading does not appear in the TOC.
==== Heading 4 Example ====
---++++ ~TWiki Heading 4 Example
====!! Heading 4 Example (no toc) ====
---++++!! ~TWiki Heading 4 Example (no toc)
Heading 4 Example
TWiki Heading 4 Example
Heading 4 Example (no toc)
TWiki Heading 4 Example (no toc)
Tables are built with bar | characters. Each table cell is built with the contents between 2 bars. To create cells that span several columns use consecutive bars. To create cells that span several rows, use a ^ character in the empty rows. Table headers are either created with * markup around the text or by a = that directly follows the |.
| *A* | *B* | *C* | *D* |
| A1 | B1 | C1 | D1 |
|| AB2 | C2 | D2 |
| A3 | B3 | C345 | D3 |
| A4 | B4 |^ | D4 |
| A567 | B5 |^ | D5 |
|^ | B6 | C6 | D6 |
|^ || BC789 | D7 |
| A8 ||^ | D89 |
| A9 ||^ |^ |
The alignment of the cell is determined by the spacing between the | and the cell text. Use 0 or 1 space to align the cell left, 2 spaces to center the cell and 3 or more spaces to right align the cell.
|= Country |= Population |
| Switzerland | 7.5 Mio |
| Italy | 58.1 Mio |
| Germany | 82.4 Mio |
There are four environment scopes that define variables:
- text - The text scope contains the variables that are defined just within the wiki text.
- topic - The topic scope contains the variables that are defined for that topic.
- space - The space scope contains the variables of this topic and all ancestor topics up to the topic-space, that is, all the properties of all topics you see in the trail.
- global - The global scope contains the variables of globally defined properties.
- all - Not really a scope, just represents a holistic view of all scopes, where the global is overlayed by the space by the topic by the text scope.
To define a variable, use the <wiki:set/> tag. This variable will always be defined in the text scope.
<wiki:set name="myvar">Hello **world**.</wiki:set>
To dump an environment, use the <wiki:env/> tag.
__**Text Scope**__\\
<wiki:env scope="text"/>\\
__**Topic Scope**__\\
<wiki:env scope="topic"/>\\
__**Space Scope**__\\
<wiki:env scope="space"/>\\
__**Global Scope**__\\
<wiki:env scope="global"/>\\
__**//all// Scope**__\\
<wiki:env scope="all"/>
displays as:
| Name |
Value |
| GOOGLE |
[http://www.google.com/search?q=%var.args%|%var.args%] |
| LINK |
<a href="%var.args.0%">%var.args.1%</a> |
| loop |
Recursive %loop% |
| me.email |
somebody@day.com |
| me.fullname |
Some Body |
| me.home |
/content/wiki/Users/sbody |
| me.userid |
sbody |
| myvar |
Hello **world**. |
| product.company |
Day Software |
| product.copy |
© 2010 by %product.company% |
| wiki.docroot |
/apps/wiki/docroot |
| wiki.prefix |
|
| wiki.url |
http://wiki.day.com |
| wiki.version |
1.0.0.SNAPSHOT.20090107 |
| Name |
Value |
| topic.attachments |
WikiSyntax/wiki:attachments |
| topic.name |
WikiSyntax |
| topic.parent.path |
/apps/wiki/content/Wiki |
| topic.path |
/apps/wiki/content/Wiki/WikiSyntax |
| topic.space |
Wiki
|
| topic.title |
|
| topic.uuid |
ce14f39d-7686-40fc-8fdc-8071358d80b3 |
| Name |
Value |
| APACHE_JIRA |
[%jira.url%/%var.args%|{{%bugzilla.icon%}} %var.args%] |
| ATTACHURLPATH |
%topic.attachments% |
| BC |
<div><iframe src="http://mis-info.day.com/card.php?user=%topic.name%" width="510" frameborder="0" height="320"></iframe></div> |
| BUG |
{{%bugzilla.icon%}} <a href='%bugzilla.url%%var.args%' target='_new'>Bug #%var.args%</a> |
| CQ |
Communiqué |
| DAM |
[http://dam.day.com/dam/home?media=content/%var.args%|%var.args% in DAM] |
| JCR |
JCR {{%bugzilla.icon%}} <a href='%jira.url%/JCR-%var.args%' target='_new'>JCR-%var.args%</a> |
| JIRA |
{{%bugzilla.icon%}} <a href='%jira.url%/%var.args%' target='_new'>%var.args%</a> |
| RECENT_CHANGES |
<div style="float:right; width: 300px; border: 1px solid grey; background-color:#ddd; padding: 5px; font-size:10pt;"><strong style="font-size:10pt">Recent changes below %topic.name%:</strong><!-- Note that // should be descendant-or-self and thus include the current topic in the result - but as it is implemented only as descendant in CRX/Jackrabbit, this does not work. --><wiki:search jcrQuery="/%topic.path%//element(*, wiki:Topic) order by @wiki:lastModified descending" numResults="10"><wiki:searchResults> [<wiki:get name="result.topic.path"/>|<wiki:get name="result.topic.displayTitle"/>] <address style="font-size:8pt"> <wiki:get name="result.topic.lastModified"/> by [<wiki:get name="result.topic.lastModifiedBy"/>] </address> </wiki:searchResults></wiki:search></div> |
| RECENT_CHANGES_THIS |
<div style="float:right; width: 300px; border: 1px solid grey; background-color:#ddd; padding: 5px; font-size:10pt;"><strong style="font-size:10pt">Recent changes of this page:</strong><!-- Note that // should be descendant-or-self and thus include the current topic in the result - but as it is implemented only as descendant in CRX/Jackrabbit, this does not work. --><wiki:search jcrQuery="/%topic.path% order by @wiki:lastModified descending" numResults="10"><wiki:searchResults> [<wiki:get name="result.topic.path"/>|<wiki:get name="result.topic.displayTitle"/>] <address style="font-size:8pt"> <wiki:get name="result.topic.lastModified"/> by [<wiki:get name="result.topic.lastModifiedBy"/>] </address> </wiki:searchResults></wiki:search></div> |
| SLING |
{{%bugzilla.icon%}} <a href='%jira.url%/SLING-%var.args%' target='_new'>SLING-%var.args%</a> |
| SPREADSHEET |
<script>document.write(String.fromCharCode(60) + "iframe width='100%' height='500' frameborder='0' src='ht"+"t"+"p"+":"+"/"+"/"+"spreadsheets.google.com/a/day.com/pub?key=pyj5rBGg3r4QvsPU-jwSCHg&output=html&gid=0widget=true'>"+String.fromCharCode(60)+"/iframe>");</script> |
| TOC |
<wiki:toc/> |
| bugzilla.icon |
%wiki.docroot%/bug_small.png |
| bugzilla.url |
http://bugs.day.com/bugzilla/show_bug.cgi?id= |
| jira.url |
https://issues.apache.org/jira/browse |
| topic.name |
WikiSyntax |
| topic.parent.path |
/apps/wiki/content/Wiki |
| topic.path |
/apps/wiki/content/Wiki/WikiSyntax |
| topic.space |
Wiki |
| topic.title |
|
| topic.uuid |
ce14f39d-7686-40fc-8fdc-8071358d80b3 |
| wiki.docroot |
%wiki.prefix%/apps/wiki/docroot |
| wiki.prefix |
|
| Name |
Value |
| APACHE_JIRA |
[%jira.url%/%var.args%|{{%bugzilla.icon%}} %var.args%] |
| ATTACHURLPATH |
%topic.attachments% |
| BC |
<div><iframe src="http://mis-info.day.com/card.php?user=%topic.name%" width="510" frameborder="0" height="320"></iframe></div> |
| BUG |
{{%bugzilla.icon%}} <a href='%bugzilla.url%%var.args%' target='_new'>Bug #%var.args%</a> |
| CQ |
Communiqué |
| DAM |
[http://dam.day.com/dam/home?media=content/%var.args%|%var.args% in DAM] |
| H |
%ICON{help}% |
| ICON |
{{%wiki.prefix%/apps/wiki/content/Wiki/WikiIcons/wiki:attachments/%var.args%.gif|%var.args%}} |
| JCR |
{{%bugzilla.icon%}} <a href='%jira.url%/JCR-%var.args%' target='_new'>JCR-%var.args%</a> |
| JIRA |
{{%bugzilla.icon%}} <a href='%jira.url%/%var.args%' target='_new'>%var.args%</a> |
| N |
%ICON{new}% |
| P |
%ICON{pencil}% |
| RECENT_CHANGES |
<div style="float:right; width: 300px; border: 1px solid grey; background-color:#ddd; padding: 5px; font-size:10pt;"><strong style="font-size:10pt">Recent changes below %topic.name%:</strong><!-- Note that // should be descendant-or-self and thus include the current topic in the result - but as it is implemented only as descendant in CRX/Jackrabbit, this does not work. --><wiki:search jcrQuery="/%topic.path%//element(*, wiki:Topic) order by @wiki:lastModified descending" numResults="10"><wiki:searchResults> [<wiki:get name="result.topic.path"/>|<wiki:get name="result.topic.displayTitle"/>] <address style="font-size:8pt"> <wiki:get name="result.topic.lastModified"/> by [<wiki:get name="result.topic.lastModifiedBy"/>] </address> </wiki:searchResults></wiki:search></div> |
| RECENT_CHANGES_THIS |
<div style="float:right; width: 300px; border: 1px solid grey; background-color:#ddd; padding: 5px; font-size:10pt;"><strong style="font-size:10pt">Recent changes of this page:</strong><!-- Note that // should be descendant-or-self and thus include the current topic in the result - but as it is implemented only as descendant in CRX/Jackrabbit, this does not work. --><wiki:search jcrQuery="/%topic.path% order by @wiki:lastModified descending" numResults="10"><wiki:searchResults> [<wiki:get name="result.topic.path"/>|<wiki:get name="result.topic.displayTitle"/>] <address style="font-size:8pt"> <wiki:get name="result.topic.lastModified"/> by [<wiki:get name="result.topic.lastModifiedBy"/>] </address> </wiki:searchResults></wiki:search></div> |
| S |
%ICON{starred}% |
| SLING |
{{%bugzilla.icon%}} <a href='%jira.url%/SLING-%var.args%' target='_new'>SLING-%var.args%</a> |
| SPREADSHEET |
<script>document.write(String.fromCharCode(60) + "iframe width='100%' height='500' frameborder='0' src='ht"+"t"+"p"+":"+"/"+"/"+"spreadsheets.google.com/a/day.com/pub?key=pyj5rBGg3r4QvsPU-jwSCHg&output=html&gid=0widget=true'>"+String.fromCharCode(60)+"/iframe>");</script> |
| T |
%ICON{tip}% |
| TOC |
<wiki:toc/> |
| TODO |
%ICON{todo}% |
| W |
%ICON{warning}% |
| Y |
%ICON{choice-yes}% |
| bugzilla.icon |
%wiki.docroot%/bug_small.png |
| bugzilla.url |
http://bugs.day.com/bugzilla/show_bug.cgi?id= |
| jira.url |
https://issues.apache.org/jira/browse |
| wiki.docroot |
%wiki.prefix%/apps/wiki/docroot |
| wiki.prefix |
|
| Name |
Value |
| APACHE_JIRA |
[%jira.url%/%var.args%|{{%bugzilla.icon%}} %var.args%] |
| ATTACHURLPATH |
%topic.attachments% |
| BC |
<div><iframe src="http://mis-info.day.com/card.php?user=%topic.name%" width="510" frameborder="0" height="320"></iframe></div> |
| BUG |
{{%bugzilla.icon%}} <a href='%bugzilla.url%%var.args%' target='_new'>Bug #%var.args%</a> |
| CQ |
Communiqué |
| DAM |
[http://dam.day.com/dam/home?media=content/%var.args%|%var.args% in DAM] |
| GOOGLE |
[http://www.google.com/search?q=%var.args%|%var.args%] |
| H |
%ICON{help}% |
| ICON |
{{%wiki.prefix%/apps/wiki/content/Wiki/WikiIcons/wiki:attachments/%var.args%.gif|%var.args%}} |
| JCR |
{{%bugzilla.icon%}} <a href='%jira.url%/JCR-%var.args%' target='_new'>JCR-%var.args%</a> |
| JIRA |
{{%bugzilla.icon%}} <a href='%jira.url%/%var.args%' target='_new'>%var.args%</a> |
| LINK |
<a href="%var.args.0%">%var.args.1%</a> |
| N |
%ICON{new}% |
| P |
%ICON{pencil}% |
| RECENT_CHANGES |
<div style="float:right; width: 300px; border: 1px solid grey; background-color:#ddd; padding: 5px; font-size:10pt;"><strong style="font-size:10pt">Recent changes below %topic.name%:</strong><!-- Note that // should be descendant-or-self and thus include the current topic in the result - but as it is implemented only as descendant in CRX/Jackrabbit, this does not work. --><wiki:search jcrQuery="/%topic.path%//element(*, wiki:Topic) order by @wiki:lastModified descending" numResults="10"><wiki:searchResults> [<wiki:get name="result.topic.path"/>|<wiki:get name="result.topic.displayTitle"/>] <address style="font-size:8pt"> <wiki:get name="result.topic.lastModified"/> by [<wiki:get name="result.topic.lastModifiedBy"/>] </address> </wiki:searchResults></wiki:search></div> |
| RECENT_CHANGES_THIS |
<div style="float:right; width: 300px; border: 1px solid grey; background-color:#ddd; padding: 5px; font-size:10pt;"><strong style="font-size:10pt">Recent changes of this page:</strong><!-- Note that // should be descendant-or-self and thus include the current topic in the result - but as it is implemented only as descendant in CRX/Jackrabbit, this does not work. --><wiki:search jcrQuery="/%topic.path% order by @wiki:lastModified descending" numResults="10"><wiki:searchResults> [<wiki:get name="result.topic.path"/>|<wiki:get name="result.topic.displayTitle"/>] <address style="font-size:8pt"> <wiki:get name="result.topic.lastModified"/> by [<wiki:get name="result.topic.lastModifiedBy"/>] </address> </wiki:searchResults></wiki:search></div> |
| S |
%ICON{starred}% |
| SLING |
{{%bugzilla.icon%}} <a href='%jira.url%/SLING-%var.args%' target='_new'>SLING-%var.args%</a> |
| SPREADSHEET |
<script>document.write(String.fromCharCode(60) + "iframe width='100%' height='500' frameborder='0' src='ht"+"t"+"p"+":"+"/"+"/"+"spreadsheets.google.com/a/day.com/pub?key=pyj5rBGg3r4QvsPU-jwSCHg&output=html&gid=0widget=true'>"+String.fromCharCode(60)+"/iframe>");</script> |
| T |
%ICON{tip}% |
| TOC |
<wiki:toc/> |
| TODO |
%ICON{todo}% |
| W |
%ICON{warning}% |
| Y |
%ICON{choice-yes}% |
| bugzilla.icon |
%wiki.docroot%/bug_small.png |
| bugzilla.url |
http://bugs.day.com/bugzilla/show_bug.cgi?id= |
| jira.url |
https://issues.apache.org/jira/browse |
| loop |
Recursive %loop% |
| me.email |
somebody@day.com |
| me.fullname |
Some Body
|
| me.home |
/content/wiki/Users/sbody |
| me.userid |
sbody |
| myvar |
Hello **world**. |
| product.company |
Day Software
|
| product.copy |
© 2007 by %product.company% |
| topic.attachments |
WikiSyntax/wiki:attachments |
| topic.name |
WikiSyntax |
| topic.parent.path |
/apps/wiki/content/Wiki |
| topic.path |
/apps/wiki/content/Wiki/WikiSyntax |
| topic.space |
Wiki |
| topic.title |
|
| topic.uuid |
ce14f39d-7686-40fc-8fdc-8071358d80b3 |
| wiki.docroot |
/apps/wiki/docroot |
| wiki.prefix |
|
| wiki.url |
http://wiki.day.com |
| wiki.version |
1.0.0.SNAPSHOT.20090107 |
To dump one variable, use the <wiki:get/> tag:
<wiki:get name="myvar"/>
displays as:
Hello **world**.
Using a variable in an HTML argument
If you want to use a variable in an HTML argument, you can reference it by using the ${var} syntax. To include the variable in the wiki-text, that is, if you want the variable to be parsed again, use the % syntax:
myvar is: %myvar%
Illegal vars: %test$ 50% %%\\
Empty vars: "%foo.bar%"\\
displays as:
myvar is: Hello world.
Illegal vars: %test$ 50% %
Empty vars: ""
Note
The difference between <wiki:get/> and the %var% syntax is the render time. The tag is executed when the document is rendered, where as with the property notation, the variable is replaced during the parsing of the text.
Variables containing other variables
Variables can contain other variables:
<wiki:set name="product.copy">© 2010 by %product.company%</wiki:set>
<wiki:set name="product.company">Day Software </wiki:set>
<wiki:set name="loop">Recursive %loop%</wiki:set>
//%product.copy%//
//%loop%// test.
displays as:
© 2010 by Day Software
Recursive test.
Variables containing arguments
Variables can contain arguments (see also BUG definition in previous tables):
<wiki:set name="GOOGLE">[http://www.google.com/search?q=%var.args%|%var.args%]</wiki:set>
View google results for %GOOGLE{jcr}%.
<wiki:set name="LINK"><a href="%var.args.0%">%var.args.1%</a></wiki:set>
%LINK{http://www.day.com,Day Software}%
displays as:
View google results for jcr.
Day Software
The wiki can also be extended through a plugin API.
|
|
Note: Customers with DayCare user accounts need to create a new account for use on day.com.