DokuWiki

It's better when it's simple

User Tools

Site Tools


template:simple_sidebar

simple sidebar Template

Compatible with DokuWiki

Lemming, Anteater, Rincewind, Angua, Adora Belle, Weatherwax, Binky, Ponder Stibbons, Hrun, Detritus, Elenor of Tsort, Frusterick Manners

template Simple Left Sidebar, with Previous Default DokuWiki Template Look

Last updated on
2017-09-05
Repository
Source

This extension has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues.

Extension name contains underscore, will not generate popularity points.

Tagged with sidebar

A simple left-hand side bar which retains the look and feel of the original “default” template, which preceded the current “dokuwiki” template. The side bar width is controlled by changing the width of the main page. Instructions are in the style.css file.

There is also a toggle button above the sidebar for closing and opening it.

Download and Install

Use the following URL to download this template (for Adora Belle): simple_sidebar.zip

For earlier Dokuwiki distributions

Refer to template on how to install and use templates in DokuWiki.

Sizing the page

These instructions apply only to the to distributions post-anteater.

This template has a left-hand sidebar and a right-hand main page. The default measurements are set in the file style.ini:

  • __page_width__ = "1000px" ; this is the overall width (main page + sidebar):
  • __right_width__ = "80%" ; this is the width of the right-hand main page, i.e 80% of total width or 800px
  • __top_bar_width__ = "980px" ; width of the top bar which goes across top of entire page
  • __bottom_bar_width__ = "770px" ; width of bar that appears on the bottom of the right-hand page

There is no separate setting for the side bar. The size of the sidebar is always relative to the main page, so that if the main page is set to 75%, then the sidebar will be 25%. Using the above values, that would mean that the main page would be 750px wide and the side bar 250px.

The top bar and bottom bar sizes are set to fit into the default page layout and may have to be adjusted if the sizes of the sidebar and main page change.

For more information about style.ini, see the css page.

Setting Up the Sidebar

The sidebar has two components, the main (top) section, which is required, and the bottom section which is user-defined.

  1. The main section
    The sidebar content can be included in either the file sidebar.html or sidebar.php. It has a default set-up, which serves as an example. You can alter this as you need. It uses a default css styling which fits in with the styling of the main page. There is only one proviso, that is, if the text of the sidebar is wider than the sidebar, it will encroach on the main page.
  2. User-defined section
    This is a wiki page created in the sidebar namespace with the user's name. For instance, if the user is jones and there is a page named: sidebar:jones, this page will be displayed beneath the main sidebar section when jones is logged in. When jones logs off jones's section disappears. The user-defined section is set to 160px in style.ini. This may have to be altered if you change the proportions of the page. If the user-defined sidebar section is wider than the main sidebar section, it will be scrolled.

The user-defined sidebar component is not in some of the earlier distributions.

Configuration Options for Suppressing the Sidebar

  1. sbar_closed: a comma-delimited list of pages (namespace:page) where the sidebar will not be open when the page loads
  2. sidebar_off: a checkbox which, when checked, suppresses the sidebar for all pages.

When either of these options is active the toggle button is also turned off.

Font Size

With changes on December 11 2014, the font-size was increased. However, if your prefer the smaller size of previous distributions, you can get this by uncommenting the following line in' style.css'':

/* font: 9pt bold Verdana, "Lucida Grande", Lucida, Helvetica, Arial, sans-serif; color: #333333; */

You will find it at about line 30.

Discussion

Sites using this Template

template/simple_sidebar.txt · Last modified: 2023-10-30 23:48 by Klap-in

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki