1 Jul 2012 05:19
Sidebar tweak for Starter template
Filippo A. Salustri <salustri <at> ryerson.ca>
2012-07-01 03:19:23 GMT
2012-07-01 03:19:23 GMT
Hi all,
(Please be gentle; this is my first post to this list, and I've only
been running dokuwiki for all of 2 days.)
I'm using starter template because - well, it's good for beginners.
It's working wonderfully.
But I really want to be able to alter the contents of the sidebar in
the starter template.
Starter seems to include only the sidebar in the root namespace.
First, I tried using the include plugin to include .:sidebar, so that
no matter what namespace I was in, the local sidebar would load.
I was hoping that when the include was processed, the current
namespace would have been the one of the page.
However, it didn't seem to be that, because the local sidebar would
never show up.
So I came up with a little hack that seems to work.
I changed the code in starter's main.php so that it loads the local
sidebar rather than the one in the root namespace.
Then, if I want to include other sidebars, I can refer to them
explicitly (e.g. ":sidebar" to include the root sidebar).
It seems to work well, and I wanted to share the tweak, because I
didn't find evidence of it elsewhere on the web.
Find this code in starter's main.php:
<!-- ********** ASIDE ********** -->
<div id="dokuwiki__aside"><div class="pad include">
<?php tpl_include_page(tpl_getConf('sidebarID')) /*
includes the given wiki page */ ?>
(Continue reading)
RSS Feed