WPFwiki supports
Snippets. This page will help you understand how to use them.
Edit1 - What is a Snippet?
A Snippet is a typically small piece of text that can be included anywhere in the Wiki. A Snippet can contain WikiMarkup, XHTML and plain-text. Snippets can be created, deleted and modified only by the Administrators, using the dedicated panel in the administration page. Every Snippet must have a unique name.
Edit2 - Using Snippets
A snippet can be inserted by simply using the following syntax:
{s:SnippetName}where
SnippetName is the name of the snippet you want to insert (case insensitive).
You can add a snippet in a Page or in any of the "meta" files (Sidebar, Header, etc.). Snippets are "resolved" recursively, so you can insert a Snippet into another. If you insert a non-existent Snippet, you will get a red warning in the Page stating "FORMATTER ERROR (Snippet Not Found)."
Edit2.1 - Example
To produce a reusable Draft snippet like this:
This page is a Draft, its content is not complete and might contain errors.
you should paste the following code into a new Snippet named
Draft in the
administration interface (see next section):
<div style="border-top: solid 2px #FED626; border-bottom: solid 2px #FED626; padding: 4px 4px 4px 36px; vertical-align: middle; background-color: #FFF7C0; background-image: url({UP}Alert.png); background-repeat: no-repeat; background-position: 10px center;">
This page is a ''Draft'', its content is not complete and might contain errors.
</div>You then should upload the
Alert.png file into your Wiki using the
File Management page.
Edit2.2 - Toolbar
You can also insert a Snippet using the handy "Insert a Snippet" button of the
editing Toolbar, which displays a menu containing all the available Snippets.
Edit3 - Snippets Management
The
Snippets tab of the
administration interface allows you to create, edit and delete snippets. The list displays the existing Snippets and their
Provider.
Edit3.1 - Creating a new Snippet
To create a new Snippet, click on the
New button and insert the Snippet name and content. You can also select the
Provider to use for the new Snippet. When you are finished, click on the
Save Snippet button.
Edit3.2 - Deleting a Snippet
To delete a Snippet, select it in the list and then click on the
Delete button. You will be asked to confirm the operation.
Edit3.3 - Modifying a Snippet
You can edit the
content of a Snippet (but not the Name). To do so, select it in the list and then click on the
Edit button. Modify the content, and then click on the
Save Snippet button.
Copyright notice: The content of this page is used with permission. It is not copyrighted by Xceed.