It's not required, but please consider linking to this page or the main page from your site if you like this product.
Before downloading or using this product, make sure you understand and accept the terms of the license.
After downloading, make sure to follow the instructions below; you will not be able to use the template otherwise.
This template allows you to use multiple templates in one DokuWiki installation, based on what the path to any particular page begins with.
For instance, you can have the monobook template for all of your site, roundbox template for user directories, SXS for discussions, and default for the playground.
Better yet, if you're making a customized site, you can simply make different templates for different sections.
In fact, you can even use custom templates for individual pages; so you could make playground:playground have another custom template that would be different from other pages in the playground namespace.
So there you have it. Now let's see how to configure it.
The $multitemplate variable is your way to configure which templates get applied to which pages on your website. All you simply need to do is edit local_pref.php in the multitemplate folder.
Here is the default configuration:
$multitemplate['playground'] = 'default'; $multitemplate[''] = 'monobook';
This makes it so that the "default" template gets applied to the playground namespace, or any path/file that begins with "playground". Then, anything that doesn't match, by default, gets the "monobook" template.
Just add or remove lines as you see fit. Ok, so simple enough, right?
But there's one thing to consider– lets say that we want to use a different template for a page that is located at "playground:test".
This will not work:
$multitemplate['playground'] = 'default'; $multitemplate['playground:test'] = 'roundbox'; $multitemplate[''] = 'monobook';
Why is this the case? Because 'playground:test' will match against 'playground' first, and then terminate. So the rule to remember is, longer namespaces go first. That means 'playground:test' comes before 'playground'.
So here's what your local_pref.php would look like:
$multitemplate['playground:test'] = 'roundbox'; $multitemplate['playground'] = 'default'; $multitemplate[''] = 'monobook';
So, is that all the configuration you need to do? No, keep reading!
Here is the last part. You must modify your templates first because of the way multitemplate works.
The latest version of Monobook for Dokuwiki will already work with multitemplate as is.
For some templates, or templates you make yourself, you'll only need to do a few things:
DOKU_TPL
with $DOKU_TPL
DOKU_TPLINC
, replace with $DOKU_TPLINC
as well<?php if (isset($DOKU_TPL)==FALSE) $DOKU_TPL = DOKU_TPL; if (isset($DOKU_TPLINC)==FALSE) $DOKU_TPLINC = DOKU_TPLINC; ?>
And that's it, now it is multitemplate ready. Also, this will allow the template to work stand-alone or with multitemplate.
If you require style.ini support, there is also a style.ini helper plugin for Multitemplate by Pascal Bihler that you will need to install.
Installation itself is simple, just unzip the file into the folder lib/tpl in your DokuWiki install, and add $conf['template'] = "multitemplate";
to your local.php file, which is located in the conf folder in your DokuWiki install.
As with Monobook for Dokuwiki, I suggest you turn off "Compress CSS and javascript files" because it's a buggy feature in DokuWiki.
If one or more of your templates use the configuration manager, you will need to open the configuration manager and configure the template for each different template you have.
In other words, if you use the templates "monobook" and "default", you will need to:
You may notice that you'll end up with a section called "Undefined settings"; this is normal though.
January 2, 2007
November 3, 2006
June 24, 2006 - b
June 24, 2006