This page shows you how to create your own theme.
You can then apply advanced design and logic to your whole website application.
Combostrap uses a theme system where:
The Combostrap default theme is located in this directory
dokuwiki_home/lib/plugins/combo/resources/theme/default
If you discover this theme, you will this layout directory:
Handlebar templates are files that are written in the following two languages:
They get an array of data called a model and replace their value at runtime.
To simplify, the model is:
If you want to get the whole model definition, contact us.
For instance, the following handlebars expression would be replaced with the page tile
{{ title }}
The template definition files contain properties that apply to the template.
For instance, if you want to use slots in your template, you need to define them.
The median template for instance contains 4 slot elements.
slots:
- 'page-header'
- 'page-footer'
- 'main-header'
- 'main-footer'
Handelbar partial are handlebars syntax that can be included and therefore reused in templates.
For instance, the below handlebars syntax will include the partial page-footer-partial.hbs that contains the footer of each template.
{{>page-footer-partial}}
A component stylesheet is a tiny CSS stylesheet that is applied when a component is used on your page.
It will overwrite the default styling of your bootstrap stylesheet.
Combostrap looks at themes in the directory combo/theme located in the data directory
For a standard dokuwiki installation, the directory is:
dokuwiki_home/data/combo/theme
If you name your theme, mytheme, you should then create the following directories
dokuwiki_home/data/combo/theme/mytheme
dokuwiki_home/data/combo/theme/mytheme/components/css
dokuwiki_home/data/combo/theme/mytheme/components/html
dokuwiki_home/data/combo/theme/mytheme/pages/templates
dokuwiki_home/data/combo/theme/mytheme/pages/partials
Now that you have created your theme directory, you can select it.
dokuwiki_home/data/combo/theme/mytheme/pages/templates/custom-median.hbs
dokuwiki_home/data/combo/theme/mytheme/pages/templates/custom-median.yml
<header id="main-header">
<h1>Custom title: {{ title }}</h1>
</header>
The default template follows the following pattern:
If you want to apply the same template for the namespace :howto, you need to create the following templates:
Note that these templates will be applied by default on every namespace that has this name. For instance, they will also be applied to the namespace :docs:howto.
If you want to be more precise, you need to add all namespace name parts in the name of the template. In our case, you need to create the following templates:
From there, you can create any theme that suits your needs.