Welcome to TracWikiTemplates Plugin Support Site
First of all let me welcome you to my first plugin for Trac support site.
This plugin is not Trac 0.11 compatible, nor will it be untill someone submits a patch for it. My time is scarce, a lot has changed with Trac 0.11 and I simple don't have the time to update this plugin.This plugin started from the wonderfull work, but not currently working WikiInclude macro by Vegard Eriksen.
What is TracWikiTemplates Plugin
It's a plugin to include pre-formated parts/text of Wiki pages into the wiki page using it, by expanding {{n}}, n being a number, from the arguments passed to it.
Get The Plugin
You can get the plugin from here. Older versions are here.
Or from source:
svn co http://wikitemplates.ufsoft.org/svn/trunk TracWikiTemplates
Enable The Plugin
First you must enable the plugin. Edit your trac.ini, under [components] you should at least have:
[components] wikitemplates.* = enabled
One thing though, if all you're after is the Include macro, you should not enable the templates macro, it will save you a DB upgrade, ie:
[components] wikitemplates.* = enabled wikitemplates.macros.templates.templatesmacro = disabled
How To Use The Templates Macro
Now, a better explanation is, imagine a wiki page serving as a template and inside it there is:
{{{
#!html
<span style="color: #339900; font-family: monospace;">{{1}}</span>
}}}
To use that template, one would put on the wiki page being edited:
[[T(GreenText|The Green Text Passed)]]
The output is The Green Text Passed.
Another example, now passing two arguments. Here's the template:
{{{
#!html
<span style="color: #339900; font-family: monospace;">{{1}}</span> <span style="color: red;">{{2}}</span>
}}}
To use that template, one would put on the wiki page being edited:
[[T(GreenAndRedText|The Green Text Passed|And The Red Not Monospace Text)]]
and this would output The Green Text Passed And The Red Not Monospace Text
You can even use the ImageMacro for templates. This plugin provides an alternate ImageMacro that supports the templates handler, but must be called the three arguments way, ie:
[[Image(templates:TemplateName:AttachmentName.png)]]
Great aint it? Just imagine the posibilities...
Creating The Wiki Templates
Now, how do you create the templates, right?
As of version 0.3.0rc1, all the wiki templates are stored on it's own database and have it's own handler. Just follow the Wiki Templates link on wiki's context nav(the one bellow the main nav, if javascript is enabled) or on the main nav. There you'll find a form that will help you create a new template. Still, a template can be created like:
http://you.url.com/templates/TheTemplateToCreate
You can also look at the FAQ, it's a good example on how to use this plugin.
How To Use The Includes Macro
The includes macro will enable the inclusion of a full wiki page(withouth the arguments parsing like the templates macro), or an off-site web page.
Examples
Include an internal wiki page:
[[Include(AWikiPageName)]]
Include an external web page:
[[Include(http://the.url.com/page.html)]]
Other Questions
For other questions please read the FAQ.
Bugs/New Features Submission
To submit a task, bug or new feature, you have to register. Registration will also allow you to change wiki pages and keep you up to date of any changes on your tickets, as long as you provide your email on the settings page.
