====== DokuWiki Template Development ====== You can customize the design of [[:DokuWiki]] by creating a new template. A template is determined by some PHP and CSS files stored in a directory beyond the ''/lib/tpl/'' directory. (actually, the template is made of HTML, the PHP in it is used to insert the content.) ===== Getting Started ===== The easiest way to create a new template is by taking an already existing one as starting point. It's a good idea to use the [[template:starter]] template because it is clean and follows the DokuWiki template standards. Template names (directories) have to be lowercase, and "." or "_" are not allowed. - Copy the ''lib/tpl/default'' directory to ''lib/tpl/yourname'' - Select the new template in the configuration manager - Then have a look at the template files (see [[#Directory Layout]]) - Have a look on how [[:DokuWiki]] handles [[CSS]] using its [[devel:css|CSS dispatcher]]. - Handling of configuration settings is analogous to [[common_plugin_functions|plugins]]. Use ''%%tpl_getConf()%%'' to retrieve custom template settings. ===== Directory Layout ===== The templates should follow the following directory structure (all paths are relative to the template directory). The CSS files are specified in the ''[[CSS#style.ini]]'' file but you should try to at least provide one CSS file for the screen presentation and one for printing. * ''/lib/tpl/