Sometimes you might want that every page in a certain namespace is based on a common skeleton. For example, in the address namespace you could have an already prepared table, which only needs to be filled with data. This can be easily achieved with so called “namespace templates”. When a page is created, DokuWiki looks up whether there is a file _template.txt in that namespace and copies it into the edit field for the new page.
You can't edit the template.txt through DokuWiki – only someone who can edit the files inside the DokuWiki folders (usually an administrator using FTP or WebDAV) can.1)2) One way to create the template file is to
* use the wiki to save a page with the content that you want to use as a template into the appropriate namespace
* use FTP or WebDAV to make a copy of it in the same folder and rename it, then
* use the wiki to delete the original page.
There are a few replacement patterns you can use:
^ @ID@ | full ID of the page |
^ @NS@ | namespace of the page |
^ @PAGE@ | page name (ID without namespace and underscores replaced by spaces) |
^ @USER@ | ID of user who is creating the page |
^ @NAME@ | name of user who is creating the page |
^ @MAIL@ | mail address of user who is creating the page|
^ @DATE@ | date and time when edit session started |
—-
← Return to 日本語マニュアル