header2 plugin

Compatible with DokuWiki

No compatibility info given!

plugin Allows markup syntax in the header

Last updated on
2011-01-27
Provides
Syntax, Render
Repository
Source
Conflicts with
include

Tagged with headings, syntax

Installation and Usage

Download and install the plugin using the Plugin Manager using the URL given above. Refer to Plugins on how to install plugins manually.

After installation, set 'renderer_xhtml' to “Header2” in the configuration manager.

:!: The TOC is rendered by metadata renderer instead of xhtml renderer in general 'show' action. However in 'preview' mode the TOC is rendered by xhtml renderer. So in few situations you'll find the TOC different in preview and in show mode. (mostly it doesn't happen since metedata renderer renders 'abstract' for the article and what it does is to have all markups parsed except no html tags)

Here's the demo image for embedding syntax in the header with this plugin:

Header with syntax demo

Discussion

Alternative of using renderer

This renderer is just a hack to overwrite “private” attribute of the xhtml renderer. You can fix inc/parser/xhtml.php file on your own so you don't have to config 'renderer_xhtml'.

-    private $sectionedits = array(); // A stack of section edit data
+    public $sectionedits = array(); // A stack of section edit data

danny0838danny0838

2011/01/26 17:27

TOC link empty

If you use a link with empty label (2nd parameter), you might get the title lost in the TOC. For example:

[[:start|]]

To avoid this problem, do not use an empty label (i.e. no label or non-blank label are ok). The followings are OK:

[[:start]]
[[:start|Start]]

This is due to a problem in the core metadata renderer in and before dokuwiki-2010-11-07a “Anteater”, which is already reported here.

danny0838danny0838

2011/01/22 15:43

Conflict

After activating this plugin and changing the xhtml renderer to header2 all my instances of the include plugin using “section” no longer work..the whole page is shown instead. Upon deactivating this plugin, the include works again. - Andy 2011/01/24

Angua RC1 bug

Don't work with Angua RC1 (PHP Fatal Error) and can't be turned off. You have to add

$plugins['header2'] = 0;

to conf/plugin.local.php to turn it off.

It shouldn’t work with Rincewind or Anteater either. header2 tries to read a property from the xhtml renderer class which is private and always was private (a similar problem is the reason for the header2 renderer component). — Adrian LangAdrian Lang
adrianlang

Berlin
2011/12/23 23:38
plugin/header2.txt · Last modified: 2011/12/23 23:45 by adrianlang
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 3.0 Unported
Imprint Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki
WikiForumIRCBugsGitXRefTranslate