DokuWiki

It's better when it's simple

User Tools

Site Tools


Sidebar

Translations of this page?:

Learn about DokuWiki

Advanced Use

Corporate Use

Our Community


Follow us on Facebook, Twitter and other social networks.

template:dokuwiki

DokuWiki Template

Compatible with DokuWiki

(bundled)

template DokuWiki's default template since 2012

Last updated on
2013-05-02

Similar to adoradark, lisps

Tagged with !bundled, default, mobile, responsive, sidebar

This is the new default template bundled with DokuWiki since “Adora Belle” (2012-10-13 release).

The template was designed by Clarence Lee. Read more about the template's story.

Features

  • Optional 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 DokuWiki Template Development for that.

Adding a Sidebar

The template supports a sidebar as configured in Configuration Setting: sidebar.

Changing the Width and other Styles

Additionally to the standard guaranteed 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 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.

conf/tpl/dokuwiki/style.ini
[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.

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.

Here are the locations checked by the template code:

  • The site's logo
    • :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

Action Hooks

Plugins can integrate into the template without any need for modifying the template by providing an Action component to handle the custom action hooks triggered by the template.

TEMPLATE_PAGETOOLS_DISPLAY

This 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 <head>, 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
template/dokuwiki.txt · Last modified: 2014/03/07 08:27 by 103.14.248.2