Table of Contents
TemplatePageName Plugin
Compatible with DokuWiki
- 2024-02-06 "Kaos" yes
- 2023-04-04 "Jack Jackrum" yes
- 2022-07-31 "Igor" yes
- 2020-07-29 "Hogfather" yes
Renames the template pages _template.txt and __template.txt (only editable as server admin) to the configurable names c_template and i_template which are normal wikipages
Similar to newpagetemplate
Usage
This plugin improves the usage of namespace templates (Scaffolding) by changing the name of these templates.
The users of your wiki can add the wiki pages c_template
and i_template
in a namespace via the normal editor. DokuWiki will use these pages as template for new created pages.
DokuWiki uses by default the template page names _template
and __template
, this plugin changes this to:
c_template
(template for new page in the current namespace)- and
i_template
(template inherited from higher namespaces as well)
Via the Configuration Manager you can modify the page names c_template
and i_template
to your own preferences.
Example
Wiki users can create ns:c_template
in the wiki, which will be recognized now as namespace template. When you create ns:page
next, the content of the page c_template
is prefilled in the edit window of page
.
Which pagenames are allowed?
You may use any name you like, but it depends on the pagename whether a page is editable via the wiki interface. (See next question for details)
When are namespace templates editable?
By configuring a wikipage with a name following the page name convention as template via this plugin, the users (with of course enough ACL rights) can update these wikipages via the wiki interface like any other wiki page. So you only use the characters a-z0-9
and (but not as first or last character of pagename:) -_.
.
Without this plugin, DokuWiki looks for the namespace templates _template.txt
or __template.txt
. These pages don't follow the pagename conventions as they start by _
. Therefore they aren't editable via the wiki interface. You have to modify or add them via the filesystem as server administrator.
Can this plugin be combined with Templatebyname plugin?
Yes. When TemplatebyName plugin has a matching page it can already load a template before this plugin is checked. It depends a bit on loading order (which is not sure) of these plugins which one is checked first.
Installation
Search and install the plugin using the Extension Manager. Refer to Plugins on how to install plugins manually.
Configuration and Settings
See Configuration Manager, here you can modify the templatenames yourself.
Development
Original author: Martin Hamant
August 2013 adopted by Klap-in
Last commits
- refactor (2024-02-08 00:33)
- Merge pull request #10 from dokuwiki-translate/lang_update_1286_15646… (2021-01-16 22:30)
- Merge pull request #13 from dokuwiki-translate/lang_update_240_161074… (2021-01-16 22:28)
- translation update (2021-01-15 20:55)
- translation update (2019-08-01 18:10)
- Merge pull request #9 from dokuwiki-translate/lang_update_43 (2017-12-20 22:16)
- update plugin.info.txt, some code reformatting (2016-08-24 18:46)
- Merge branch 'master' of github.com:Klap-in/dokuwiki-plugin-templatep… (2016-08-24 18:43)
Known Bugs and Issues
See for the issues or report them at the issue tracker.