From 851f2e8900ee6ea5806f852174ea377b206be0a0 Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sat, 17 Jan 2009 00:35:07 +0100 Subject: makes minimum amount of headlines configurable that determines if the TOC is built (FS#1226) darcs-hash:20090116233507-f7d6d-aaff15652d2e698a4403b3386b5b1eb6c0fa38f3.gz --- inc/parser/xhtml.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'inc/parser/xhtml.php') diff --git a/inc/parser/xhtml.php b/inc/parser/xhtml.php index bad1a21de..545f48b4e 100644 --- a/inc/parser/xhtml.php +++ b/inc/parser/xhtml.php @@ -84,7 +84,8 @@ class Doku_Renderer_xhtml extends Doku_Renderer { } // Prepare the TOC - if($this->info['toc'] && is_array($this->toc) && count($this->toc) > 2){ + global $conf; + if($this->info['toc'] && is_array($this->toc) && $conf['tocminheads'] && count($this->toc) >= $conf['tocminheads']){ global $TOC; $TOC = $this->toc; } -- cgit v1.2.3