Download the sidebar template (download packages) and unzip the file in your dokuwiki template directory, lib/tpl. That will create a folder lib/tpl/sidebar which will contain everything needed to use the sidebar template.
| NOTE | Users of the DokuWiki version rc2006-09-28 or later can change the sidebar settings using the Admin / Configuration settings page. |
|---|
The sidebar template comes with settings to enable the sidebar and place it between the two button bars and on the left hand side (as in this wiki). If you wish to use a different placement, open the file lib/tpl/sidebar/tplfn_sidebar.php in a text editor and alter the two settings, layout & orientation. In this file you can also alter the name of the page that will be used for the sidebar.
file:lib/tpl/sidebar/tplfn_sidebar.php
// sidebar configuration settings $conf['sidebar']['enable'] = 1; $conf['sidebar']['page'] = 'sidebar'; $conf['sidebar']['layout'] = 'inside'; $conf['sidebar']['orientation'] = 'left';
Enable (1) or disable (0) the sidebar.
possible values: 0, 1
default value: 1
The name of the wiki page to be shown in the sidebar.
possible values: any legal wiki page name.
default value: sidebar
Controls whether or not the sidebar appears in a column of its own (outside) or between the two button bars (inside).
possible values: inside, outside.
default value: inside
Controls the side of the window on which the sidebar is placed.
possible values: left, right.
default value: left
| NOTE | Users of the DokuWiki version 2006-03-xx or later can change the template setting using the Admin / Configuration settings page. |
|---|
Finally, edit your dokuwiki configuration to set the template setting to sidebar.
file:conf/local.php
$conf['template'] = 'sidebar';
To see anything other than the index in your sidebar, you will need to create a sidebar page - simply create a page called sidebar (or whatever name you set the page setting to) in the same way you would create any dokuwiki page.
~~NOTOC~~ on sidebar pages. The sidebar CSS will ensure no TOC is displayed in the sidebar, however the TOC will still be present in the html, this is unnecessary and could result in the page failing checks by html validators. To see an example of this, click the 'edit sidebar' button on the sidebar in this very page.(edit this page) link on the sidebar page.How can you add this button ? I hadn´t found any description how to do itAt present, it has to be an internal wiki link to the sidebar page itself, e.g.[[sidebar|edit this menu]]That loads the sidebar page into the main edit window from where you can use the Edit Page button. The sidebar should have a proper edit button. I'll add that to the To Do list. — Christopher Smith 2005/08/08 12:27
To add an 'Edit' button, refer tip: adding an edit button
Please also consider replacing'font-family: monospace;'with'font-family: Courier New, monospace;'in design.css This will improve look of the Cyrillic characters (and other non-roman languages?).
— Dmitry Cherniachenko 2005/10/03 12:45
please can you give an example? I understand that if the admin wants a special sidebar, he must:
admin:* @ALL 0 in acl.auth.php$conf['sidebar']['page'] = 'jpg:sidebar' in tplfn_sidebar.php
but it does not work.
as things stand you can't have more than one sidebar for a namespace and you shouldn't specify a namespace as part of the sidebar page name ($conf['sidebar']['page']). If you would like a different sidebar page based on permissions you would need to the following modification …if ($INFO['perm'] == AUTH_ADMIN) { $conf['sidebar']['page'] = 'admin_sidebar';}Add that line to main.php after the
@require_onceline near the top and then create youradmin_sidebarpage in the root namespace — Christopher Smith 2005/10/06 00:23
overflow:hidden;
iDo 2005/08/18 17:55 GMT+1
I just wanted to have the index in the side bar. I first edited a page 'sidebar' but I deleted that one again…. how can I get the index into th esidebar now?
If there is no sidebar page, the index should appear in the sidebar automatically. You may also want to take a look at the the various index plugins. — Chris Smith 2008/01/29 13:04
The presentation styles for the sidebar are controlled by sidebar.css. If necessary this file can be edited to change the appearance of the sidebar and its contents.
I had a few presentation errors when using this template.
design.css is one fix. Removing the float:right; from the div.toctoggle element was the second fix.design.css to the sidebar tpl design.css:I think you may have a version of the sidebar template which doesn't match your DokuWiki version. See note below. — Chris Smith 2006/10/20 11:10
If you view a sidebar page in IE 6 (including this one), you will see that the sidebar_top div will probably overlapp your sidebar content. I was able to fix this by adding an entry to the sidebar.css:
#sidebar_content { padding-top: 2.2%; }
If you can't view the border table. Changing #tocinside to #toc__inside in /lib/tpl/sidebar/design.css.
tamors 2006/10/12 10:14
I think you may have been using an incorrect version. If you have are using a recent DokuWiki release candidate you should be using the latest version of the sidebar template. I have updated the link at the top of the page to point to all of the packages to avoid confusion. — Chris Smith 2006/10/20 11:10
How can i get this nice submenu like on the wiki..jalakai.co.uk wiki sidebar?
lance 2006/10/19 15:28
Lance, the sidebar is a wiki page, normally calledsidebar. Create a wiki page by that name and create a list of links like I have. To see how I have done it, checkout the page itself (navigate1)). — Chris Smith 2006/10/20 11:10
Thanks for a splendid menutool! Everything is work OK, but when i click the namespace in the meny it expands as it should, but it will at the same time display the whole index in the main window ? Does anybody have an idea why ?
In your wiki it does not change the content of the right window at all, only expand the menu ..
sverre 2008/02/11 15:42
Its due to a change in the way DokuWiki handles its index page. The change was made after the last release (2007-06-26), to get the functionality you need a daily snapshot after 2007-08-10 or the darcs version. Details and instructions for these are given on the development resources page at splitbrain — Chris Smith 2008/02/13 11:40
this functionality should be moved in release-package<?php // sidebar configuration settings $lang['enable'] = 'Sidebar verwenden'; $lang['page'] = 'Sidebar-Seitenname'; $lang['layout'] = 'Layout'; $lang['orientation'] = 'Orientierung'; $lang['showeditbtn'] = 'Bearbeiten-Button anzeigen (wenn Benutzer Rechte für Sidebar hat)'; $lang['editbtntxt'] = 'Sidebar bearbeiten';