Template::Plugin::WikiCreole - TT wrapper for Text::WikiCreole
[% USE WikiCreole %] [% FILTER $WikiCreole %] ... [% END %]
This is a plugin used for Wiki Creole rendering inside Template Toolkit.
[% USE WikiCreole %]
At this time none of the methods for customising Text::WikiCreole are not directly available via Template::Plugin::WikiCreole. However Text:WikiCreole is an exporter and its methods act globaly. So you can use this class in your software and call its methods to change the behavour in the template.
I have found this most useful when teamed with ttree. It gives me a way to maintain the static part of a website in WikiCreole. I find it quicker to write and maintain most pages in WikiCreole. This ensures I end up with a constant style. (I have never liked HTML editors.)
For example the following ttree configuration:
src = src dest = ~/site-prefview lib = template/ template_process = layout.html depend = *=navigation.wiki,footer.wiki suffix = wiki=html ignore = ^navigation.wiki$ ignore = ^footer.wiki$ ignore = \b(CVS|RCS)\b ignore = ^\. ignore = ~$ ignore = ^# ignore = \.tiff$ copy = \.png$ copy = \.gif$ copy = \.css$ ...
and the following template:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd"> [% USE WikiCreole -%] <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta name="language" content="en" /> <link rel="stylesheet" href="css/main.css"/> <title>Change of Plan - [% template.name %]</title> </head> <body> <div class="page"> <div class="header"> [% INCLUDE header.wiki | $WikiCreole %] </div> <div class="body"> <div class="navigation"> [% INCLUDE navigation.wiki | $WikiCreole %] </div> <div class="main"> [% PROCESS $template | $WikiCreole %] </div> </div> <div class="footer"> [% INCLUDE footer.wiki | $WikiCreole %] </div> </div> </body> </html>
will create a webpage for every wiki template in the src directory with same layout and style (look and feel). The variation between pages is the content, the with the full expressive power of WikiCreole. The css file provides considerable flexability in the look.
This source itself is a blatant copy of Template::Plugin::WikiFormat by Ivor Williams
Accepts the wiki text to be rendered, and context. See Template::Plugin::Filter.
Please use http://rt.cpan.org for reporting any bugs.
Create arguments to pass
Martin Ellis
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.
Text::WikiCreole Template::Plugin::WikiFormat Template::Plugin::Filter
To install Template::Plugin::WikiCreole, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Template::Plugin::WikiCreole
CPAN shell
perl -MCPAN -e shell install Template::Plugin::WikiCreole
For more information on module installation, please visit the detailed CPAN module installation guide.