namespace_templates
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
namespace_templates [2020-05-11 09:59] – removed feature request -> use issue tracker andi | namespace_templates [2024-05-03 09:02] (current) – [Template files] differentiated zweihorn | ||
---|---|---|---|
Line 9: | Line 9: | ||
Two kinds of template files can be used: | Two kinds of template files can be used: | ||
- | * '' | + | * '' |
- | * '' | + | * '' |
- | If both (inherited and normal) templates are present in a namespace, the normal | + | If both (normal |
- | One way to create the template file is to | + | **NOTE:** Any changes to a.m. template files will //only effect newly created pages// and existing pages are always left untouched. |
+ | |||
+ | 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 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 rename it as _template.txt, then | + | - use FTP or WebDAV to rename it as _template.txt |
- | - Note: ((These changes only apply to new pages that you create in the namespace.)) | + | |
+ | However, one should prefer the [[plugin: | ||
===== Syntax ===== | ===== Syntax ===== | ||
The content of the file is just standard [[wiki: | The content of the file is just standard [[wiki: | ||
Line 26: | Line 28: | ||
Inside of the file, you may also use some replacement patterns to make the template a little more dynamic. | Inside of the file, you may also use some replacement patterns to make the template a little more dynamic. | ||
- | ^ @ID@ | + | ^ @ID@ | full ID of the page | |
- | ^ @NS@ | + | ^ @NS@ | namespace of the page | |
- | ^ @CURNS@ | + | ^ @CURNS@ |
- | ^ @PAGE@ | + | ^ @!CURNS@ |
- | ^ @!PAGE@ | + | ^ @!!CURNS@ |
- | ^ @!!PAGE@ | same as above but with the first character of all words uppercased | + | ^ @!CURNS!@ |
- | ^ @!PAGE!@ | same as above but with all characters uppercased | + | ^ @PAGE@ |
- | ^ @FILE@ | + | ^ @!PAGE@ |
- | ^ @!FILE@ | + | ^ @!!PAGE@ |
- | ^ @!FILE!@ | same as above but with all characters uppercased | + | ^ @!PAGE!@ |
- | ^ @USER@ | + | ^ @FILE@ |
- | ^ @NAME@ | + | ^ @!FILE@ |
- | ^ @MAIL@ | + | ^ @!FILE!@ |
- | ^ @DATE@ | + | ^ @USER@ |
- | ^ %a %d-%m-%y etc. | e.g. Thu 06-12-12. [[phpfn> | + | ^ @NAME@ |
- | ^ %% | + | ^ @MAIL@ |
+ | ^ @DATE@ | ||
+ | ^ %a %d-%m-%y etc. | e.g. Thu 06-12-12. [[phpfn> | ||
+ | ^ %% | a literal '' | ||
Line 91: | Line 96: | ||
* [[plugin: | * [[plugin: | ||
+ | ==== Troubleshooting ==== | ||
+ | |||
+ | Problem: An unexpected error occurs "no timestamp" | ||
+ | |||
+ | 1. Solution: Before establishing the hidden template file, first create a dummy page via the DokuWiki GUI, like so: '' | ||
+ | 2. Solution: The admin ''< |
namespace_templates.1589183987.txt.gz · Last modified: 2020-05-11 09:59 by andi