Based on sidebar template by ChrisS but works as a plugin with any template
Compatible with DokuWiki
2009-02-14+
This extension has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues.
Similar to displaywikipage, sidebarng
Based on Sidebar template by ChrisS.
After installation, you have to enable the sidebar via the Configuration Manager. Make sure to disable the original sidebar template or switch to the default template before enabling this plugin.
The plugin registers a hook after the TPL_ACT_RENDER
event, which is fired after the main content of the page is rendered. It then adds a CSS class to the page BODY
using JavaScript and also outputs the sidebar contents.
It works exactly like the Sidebar template by ChrisS but as a plugin and with (hopefully) any template.
Please list the templates you've tested this plugin with and note down problems or issues.
Template | Works? | Problems |
---|---|---|
default | X | |
sidebar | X | have to disable the template-sidebar |
<div id=“sidebar”>
in the page source.p.s. seems to work with my on-going hack of minimal template (with work I mean: something is displayed)
TPL_ACT_RENDER
event, which should be after the main content output, see tpl_act_renderHi just a couple of remarks:
tpl_content()
to display a wikipage, you will trigger als sorts of events again and enter a recursion (you omit that in your plugin, but this also keeps, under certain circumstances other plugins which use the same event from being executet at all!) … instead use p_wiki_xhtml($ID)
which can be found in inc/parserutils.php
. p_wiki_xhtml($ID)
will handle the permissions automatically for you, so you don't have to check anymore if you should display the edit button or not, it will be displayed if the user has sufficient rights.<style>
tags in the XHTML body, it's not valid. Instead put your CSS in a file named style.css
respectively print.css
inside the plugin directory. DokuWiki will automatically add it into the CSS it uses (this makes your plugin also work if javascript is disabled ).script.js
and DokuWiki will use it automatically.TPL_CONTENT_DISPLAY
and append the sidebar to the XHTML instead of TPL_ACT_RENDER
, that way you won't have to worry about open/closed divs.HTH — Michael Klier 2009/08/20 15:46