I have decided to use dokuwiki for my new blog system. mnml-blog template is very clean and looks exactly like what I am looking for. However, I have struggle with the TOC display issue for this particular template.
Environment
-
dokuwiki version: 2013-05-10a “Weatherwax”
-
mnml-blog : 2013-02-20
Solution
The TOC display fine in default and other template. After exhaust all the solution I know, I decided to check the dokuwiki document to see what function code generate the TOC.
By default, the tpl_content() function will take care of displaying a Table of Contents itself, prepending it to the actual page content. If your template uses a sidebar or other more complex layout you may want to place the TOCindependently from the page content. This can be done with the tpl_toc() function. When using it, it is important to disable automatic TOC placement by passing the argument false to the tpl_content() function.
Bingo, I decide to grep the mnml-blog and yes, I can not find any code refer to the tpl_toc.
I decided to edit main.php and add my code below the <div class="page">
<?php $toc = tpl_toc(true); if ($toc){ echo $toc; } ?>
Wow … The TOC display right away.
I know this is probably not the good solicitous but it works
0 comments:
Post a Comment