Filippo A. Salustri | 1 Jul 2012 05:19
Picon
Favicon
Gravatar

Sidebar tweak for Starter template

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)

Andrwe Lord Weber | 1 Jul 2012 11:38

Re: Sidebar tweak for Starter template

Hi,

namespaced sidebars are on the run for the new default theme.
At the moment  <at> hackfest in London we've a whole page of points to be 
thought of.

So hopefully you don't have to use your fix for a long time.

Kind regards,
Andrwe
--

-- 
DokuWiki mailing list - more info at
http://www.dokuwiki.org/mailinglist

Filippo A. Salustri | 1 Jul 2012 16:42
Picon
Favicon
Gravatar

Re: Sidebar tweak for Starter template

Cool! Thanks.
/fas

On 1 July 2012 05:38, Andrwe Lord Weber
<lord-weber-andrwe <at> renona-studios.org> wrote:
> [...]
> So hopefully you don't have to use your fix for a long time.
> [...]

-- 
\V/_
Filippo A. Salustri, Ph.D., P.Eng.
Mechanical and Industrial Engineering
Ryerson University
350 Victoria St, Toronto, ON
M5B 2K3, Canada
Tel: 416/979-5000 ext 7749
Fax: 416/979-5265
Email: salustri <at> ryerson.ca
http://deseng.ryerson.ca/~fil/
--

-- 
DokuWiki mailing list - more info at
http://www.dokuwiki.org/mailinglist


Gmane