From b8595a660455f6778266779753c6238127664a28 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 5 Aug 2007 15:24:05 +0200 Subject: separated TOC from page This patch introduces a tpl_toc() function which can be used to freely place the Table of Contents in a template. When used, tpl_content should be called with a parameter of false to supress the automatic TOC placement. Note: if tpl_toc() us run *before* tpl_content(), TOCs will not work in the preview. A work around is to run tpl_content() in a output buffer first. This patch also adds a getTOC() function for admin plugins which allows plugin authors to put create their own TOC which will be placed correctly in the template. A convenience function html_mktocitem() is available. The config manager was adjusted to make ue of this new feature, but some bugs might remain. darcs-hash:20070805132405-7ad00-77d2c3cdf66cc62b2d408cc6580f938636a109af.gz --- lib/plugins/admin.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/plugins/admin.php') diff --git a/lib/plugins/admin.php b/lib/plugins/admin.php index 00a07a054..2eeda3f7b 100644 --- a/lib/plugins/admin.php +++ b/lib/plugins/admin.php @@ -41,5 +41,9 @@ class DokuWiki_Admin_Plugin extends DokuWiki_Plugin { function forAdminOnly() { return true; } + + function getTOC(){ + return array(); + } } //Setup VIM: ex: et ts=4 enc=utf-8 : -- cgit v1.2.3