
Usage of a Wiki is very straight forward.
You can see complete demonstration of Wiki Syntax to format and structure your input text.
Two styles of markup are available: MediaWiki and Markdown.
The markup style is an extended form of Markdown Syntax. However the markup strives to be 100% Markdown compliant.
The markdown module being developed for Drupal as a filter module moves beyond the basic markdown syntax by adding the following functionality:
To link to other wiki pages you can use one of two linking techniques:
Macros are an extension to the Markdown language. The basic syntax is:
{macroname parameter=value}
There is currently no public interface to add 3rd party macros. However, we are planning on adding it at some point.
The available macros are:
The news macro allows you to display threads of a given board category. A simple usage looks like this:
{news category=7 baseURL=/board limit=5}
This would display the latest 5 threads in the board category of the id '7'.
The news macro supports the following parameters:
The News Macro requires a simple template (given by the parameter 'templateName' which is by default wiki/news.html)
An example template might look like this:
{% load sph_extras %}
<ul class="news">
{% for thread in threads %}
<li>
<div class="subject">{{ thread.postdate|sph_date }}: {{ thread.subject }}</div>
<div class="body">{{ thread.body_escaped }}</div>
{% if baseURL %}
<div class="comments"><a href="{{ baseURL }}/thread/{{ thread.id }}/">{{ thread.replyCount }} Comments</a></div>
{% endif %}
</li>
{% endfor %}
</ul>
This template renders an RSS link (including RSS icon) to the board rss feed displaying the latest threads in the given category.
{newsrss category=1}
Allows the inclusion of an external URL into a wiki snip. The file included is also rendered using Markdown !
Example Usage:
{include url=http://yourhell.com/svn/root/django/communitytools/trunk/README start=Directories end=Examples}
The example would include content from the file from the given url starting with a line containing 'Directories' until a line containing the content 'Examples'.
Allows a user to include arbitrary HTML by including a template from djang's templating system. (Ie. only an admin can create HTML content. - or anyone who has access to the template directories, or whereever the templates are stored.)
Example Usage:
{includetemplate templateName=mydir/sometemplate.html}
All additional parameters will be put into the context of the template as 'params'.
Administrators can add attachments to wiki snips. The Image macro allows to add such attachments as images into the wiki snip.
Example Usage:
{img id=123}
The example would include the image with the attachment Id 123. (The attachment Id is displayed in the list of attachments)
Creates a list of all attachments of the current wiki snip.
Example Usage:
{attachmentlist}
attachmentlist uses the generic view function object_list but without pagination.
Displays a single attachment which is referenced by it's id.
Example Usage:
{attachment id=5}
Redirects from one snip to another. This is useful to create aliases for wiki snips.
Example Usage:
{redirect snip=AnotherSnip}
This does not create an HTTP redirect, but simply loads the other snip. You can also create a chain of redirects (Like RedirectSnip1 redirects to RedirectSnip2 which redirects to RedirectSnip3 .. No idea why this would be of any use.. but it is allowed anyway) - If a loop is detected it breaks the loop at displays the snip the user has requested.
Comments
Post new comment