[dokuwiki] Re: Link in Header

  • From: Chris Smith <chris@xxxxxxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Thu, 08 Dec 2005 15:41:53 +0000

Koen Huybrechts wrote:

Chris Smith wrote:

Christian Barmala wrote:


making a header a link seems not to work

=== [[projects|My Projects]] ===
will come out as
[[projects|My Projects]]
instead of a link to the projects page with the header3 text of "My Project"

Christian Barmala

Links (in fact any markup) in headers is not possible.



In the blog-plugin, this works... How come??



The blog entry headers aren't dokuwiki markup headers, but <hx> elements generated by the plugin. I did look at writing a plugin to allow markup in headers. I gave up after realising it would be extremely difficult to support TOC entries at the same time.

Tech summary:
the CDATA between the header open/header close markup needs to be passed to the TOC handler. That currently occurs at the end of the handle process and before rendering starts. To know what is CDATA and what is not, all the markup between header open/header close needs to be rendered, only then is it possible to recognise the CDATA. That means for each header instantiating a new parser/renderer. Currently in Dokuwiki that is an expensive exercise, I believe attempting something like that would put page generation times up significantly - so much so, that I didn't think it was worth attempting to complete the plugin. If someone were to rewrite the parser to allow nesting without complete re-instantiation then it might be feasible. :-)

DokuWiki mailing list - more info at

Other related posts: