Renderer plugins aka. pluggable renderers, allow to implement different rendering mechanisms for DokuWiki. DokuWiki parses Wiki syntax into an instruction array which then is “rendered” to the desired output format. This output format is usually the XHTML to display a nicely formatted Wiki page. Pluggable renderers allow plugin authors to write their own renderer to output any format they want.
A Renderer Plugin example needs to define a class named renderer_plugin_example which extends Doku_Renderer1) or one of it's subclasses. The class needs to be stored in a file called lib/plugins/example/renderer.php.
You need to implement all methods of the Doku_Renderer class to implement full output of all DokuWiki's markup.
There are two mechanisms for calling a renderer plugin.
do=export_<plugin_name> to the page URL (e.g http://www.mywiki.com/doku.php?id=somepage&do=export_s5 or with URL rewriting, http://www.mywiki.com/somepage?do=export_s5). canRender() method, e.g.function canRender($format) { return ($format=='xhtml'); }
. This method allows DokuWiki to list the plugin in the options for this setting on its configuration page.
For an example of a renderer plugin, see the slide show plugin s5.
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 3.0 Unported