Learn about DokuWiki
Learn about DokuWiki
Compatible with DokuWiki
This extension has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues.
Security warning (please read plugin security guidelines): Plugin is installed in the directory 'cache' instead of 'pagetemplate'. Needs manually renaming.
The Pagetemplate Plugin is a new link syntax. If the page does not yet exist, it will create the page in the normal fashion. The new page, however, will not be empty ,but will contain the content copied from another page in the wiki. Once the page has been created, the pagetemplate link functions like any other internal link.
The intended purpose is to create a simple template system for semi-standard oft repeated page types. Because the template page itself may contain further relative pagetemplate links, structures of pages can be created.
Yes, those are triple square brackets.
|newpagename||name of new page||required|
|templatepagename||An existing wiki page||optional|
|Display Name||the display name for the page||optional|
[[[.new_plugin?templates:plugin_template|New Plugin]]] ;)
Wouldn't it be possible to remove the directory “cache/” from the archive.
Don't install in the usual way : the above archive sets an empty “cache” directory that leads you to a “cache” plugin that does nothing. You'd rather refer to Code Listing for manual installation.
See: Code Listing
Installed fine but the given examples above show with an underline and an extra “]” to the right and when clicked try to generate a page with BOTH the new page name AND template name merged together; the resulting page is blank.
+1 : installations says “pluging cache installed” but the triple brackets does the same as before installing the plugin. Good idea though to offer the opportunity to let users make templates, like MediaWiki offers to make “models”. — NewMorning 2008/08/03 12:20
Actually manual install works better : triple brackets are recognized, but the template isn't loaded though… — NewMorning 2008/08/07 15:01
Is there any way to get this plugin working on newer versions of dokuwiki? — tezmanian 2011/03/28 15:44
Dokuwiki offers you the possibility to define templates:
Usage/ Example: If you want to build a site with recipes and one of your namespaces (folders) reads “lunch”. And the template “_template.txt” with the skeleton for a lunch dish was put in the lunch-folder, every time a file is created in the lunch-namespace, the _template.txt is loaded in the editor-menu, where you can fill it with data. The _template.txt itself is not changed.
Have a try!
Well, perhaps the bottle contains a refined pinot to the robust default cab-sauv.
The differences from the default mechanism are:
the template page <newjob> may contain further template links -
[[[contacts?templates:newcontactpage]]], [[[timeline?templates:newtimeline]]], [[[issues?templates:newissueslist]]]
- and so on.
— Green Box 2007-08-28 03:49
With regards to _template.txt … you could also symlink template.txt to it and then edit it from within the wiki. Still requires shell interaction, but a little nicer. It will show up in indexmenu lists though, so you could either reorder it or name the symlink ztemplate.txt or something alphabetically insignificant for you application … or … put all such symlinks in another directory with some sane naming scheme. Not saying you should, it just has a few useful applications in my environment. — Ryan 2008-06-12