DokuWiki

It's better when it's simple

User Tools

Site Tools


devel:templates

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
devel:templates [2021-03-03 09:42] – [Getting Started] Aleksandrdevel:templates [2023-09-24 01:08] (current) Klap-in
Line 20: Line 20:
     * DokuWiki's infrastructure doesn't support them anywhere     * DokuWiki's infrastructure doesn't support them anywhere
     * Using underscore will also give a [[:popularity|popularity]] rating of zero.      * Using underscore will also give a [[:popularity|popularity]] rating of zero. 
-  * Spaces are also not allowed in the template name defined in ''template.info.txt'' and the folder name, including in the template page name on [[:dokuwiki|dokuwiki.org]] ''template:myfirsttemplate''+  * Spaces '' '' are also not allowed in the base name of the template defined in ''template.info.txt'' and the folder name, including the page name used in the [[:templates|template listing]] e.g. ''template:myfirsttemplate''
   * If the same name is used by two different templates   * If the same name is used by two different templates
     * they are mutually exclusive and inherent incompatible,      * they are mutually exclusive and inherent incompatible, 
Line 109: Line 109:
 Include Hooks are a simple way to add some static content to your [[:DokuWiki]] installation without writing your own [[:Template]]. You can use them for adding a standard header at the top or a disclaimer at the bottom of each page. Include Hooks are a simple way to add some static content to your [[:DokuWiki]] installation without writing your own [[:Template]]. You can use them for adding a standard header at the top or a disclaimer at the bottom of each page.
  
-The DokuWiki's default template looks for files with special names in the template directory and simply includes them at the correct places when displaying the page. You can add whatever HTML or even PHP you like into these files. Of course this only works if you are using the //default// template or a template supporting the [[template:dokuwiki#supported_include_hooks|same include hooks]] (like the starter template).+The DokuWiki's default template looks for files with special names in the template directory and simply includes them at the correct places when displaying the page. You can add whatever HTML or even PHP you like into these files. Of course this only works if you are using the //dokuwiki// template or a template supporting the [[template:dokuwiki#supported_include_hooks|same include hooks]] (like the starter template).
  
 ===== Converting existing templates ===== ===== Converting existing templates =====
devel/templates.txt · Last modified: 2023-09-24 01:08 by Klap-in

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki