[pmwiki-users] Navboxes on pmwiki

Petko Yotov 5ko at 5ko.fr
Wed Apr 1 08:35:07 CDT 2009


On Wednesday 01 April 2009 11:45:55 Michael Fake wrote:
> is it possible in PMWiki to create
> templates with variables, equivalent to the templating seen in Mediawiki
> (e.g. with navboxes, warning boxes, etc).
...
> I'd like to be able to, say, create a table in the page Templates/Navbox,
> with variables in the 'Name', 'Address', 'Title' cells, and then to pull
> that table into any other page on the wiki, and set the name, address, and
> title variables within that table on each of those pages.

Yes it is possible, I'm not sure it is properly documented.

In your page, use (:include Templates.Navbox Name="Michael Fake" 
Address=example at example.net Title=CIO:)

(Quote the values if they contain spaces.)

And in the template, have {$$Name}, {$$Address} and {$$Title} which will be 
replaced with the variables in the "include" line.

The difference with MediaWiki is that we don't have yet a way to define 
default values if the page sets none.

Thanks,
Petko



More information about the pmwiki-users mailing list