====== DokuWiki Template ====== ---- template ---- description : DokuWiki's default template since 2012 author : Anika Henke email : anika@selfthinker.org lastupdate : 2014-06-04 compatible : (bundled) similar : screenshot_img: template:dokuwiki_template.png tags : default, sidebar, !bundled, mobile, responsive ---- This is the new default template bundled with DokuWiki since "Adora Belle" (2012-10-13 release). The template was designed by [[clarencedglee@gmail.com|Clarence Lee]]. Read more [[http://blog.selfthinker.org/2012/10/20/the-story-behind-dokuwikis-new-template/|about the template's story]]. ===== Features ===== * Optional [[config:sidebar]] * Mobile support (Desktop, Tablet, Phone sizes) * HTML5 compatible ===== Customizing ===== The template supports some simple customizing. If you need more than that you should create your own template, though. Check [[devel:templates|DokuWiki Template Development]] for that. ==== Adding a Sidebar ==== The template supports a sidebar as configured in [[config:sidebar|Configuration Setting: sidebar]]. ==== Changing the Width and other Styles ==== Additionally to the standard guaranteed [[devel:style.ini]] placeholders, the template uses the following variables: ^ placeholder variable ^ meaning ^ | ''%%__background_site__%%'' | background colour of the whole site | | ''%%__link__%%'' | colour of links | | ''%%__existing__%%'' | colour of links to existing internal pages | | ''%%__missing__%%'' | colour of links to missing internal pages | | ''%%__site_width__%%'' | width of the whole site | | ''%%__sidebar_width__%%'' | width of the sidebar | E.g. you can adjust the width of the template by overriding the ''%%__site_width__%%'' variable. Simply create the file ''conf/tpl/dokuwiki/style.ini'' (or old location: ''lib/tpl/dokuwiki/style.local.ini'' in Adora Belle) and set the variable accordingly. You can either use a fixed value (px or em) or a percent value (%) if you prefer a dynamic width. [replacements] __site_width__ = "100%" You can use this file to override any other variable from the ''style.ini'' as well. E.g. for changing some of the colors. ==== Changing the Logo ==== The Logo, Favicon and Apple Touch (bookmark) icons are looked up from multiple locations. The default icons (DokuWiki logo) provided by the template can be easily exchanged by uploading the image files to their correct locations using the [[:media_manager|Media Manager popup]] or [[:fullscreen mediamanager|Fullscreen Media Manager]]. Here are the locations checked by the template code: * The site's logo * '':wiki:logo.svg'' * '':logo.svg'' * '':wiki:logo.png'' * '':logo.png'' * ''lib/tpl/dokuwiki/images/logo.png'' * The favicon * '':wiki:favicon.ico'' * '':favicon.ico'' * ''lib/tpl/dokuwiki/images/favicon.ico'' * The bookmark icon used by Apple and Android devices * '':wiki:apple-touch-icon.png'' * '':apple-touch-icon.png'' * ''lib/tpl/dokuwiki/images/apple-touch-icon.png'' Please make sure that those namespaces (either root or ''wiki:'') are [[:acl|readable]] to all users. Otherwise the image will be broken to users who are not logged in. **See also:** [[:logo|DokuWiki Logo]] ==== Action Hooks ==== Plugins can integrate into the template without any need for modifying the template by providing an [[devel:action_plugins|Action component]] to handle the custom action hooks triggered by the template. === TEMPLATE_PAGETOOLS_DISPLAY === This [[devel:event:TEMPLATE_PAGETOOLS_DISPLAY|event]] allows to extend or modify the floating pagetools menu. ''%%$event->data['items']%%'' contains an array with HTML for each item in the menu. Plugin authors should match the existing style and provide needed CSS and background image. You can use different styling or classes or markup depending on ''$conf['template']''. ''%%$event->data['view']%%'' contains information whether the pagetools are called in the ''main'' or the ''detail'' view. ==== Supported Include Hooks ==== Include hooks allow you to add additional HTML or PHP to the template without modifying any of the template files itself, making them safe to survive an update. Just create the appropriate file in either the template directory (''lib/tpl/dokuwiki/'') or your ''conf/'' directory. ^ Filename ^ Position of included HTML ^ | ''meta.html'' | Inside the HTML , use this to add additional styles or metaheaders | | ''sidebarheader.html'' | At the top of the sidebar (if any) | | ''sidebarfooter.html'' | At the bottom of the sidebar (if any) | | ''pageheader.html'' | At the top inside the content box, above the actual content | | ''pagefooter.html'' | At the bottom inside the content box, below the actual content | | ''header.html'' | At the top of the page, above the logo and wiki title | | ''footer.html'' | At the very end of the page after all other page content |