summaryrefslogtreecommitdiff
path: root/inc/parser/xhtml.php
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2006-02-19 17:47:26 +0100
committerAndreas Gohr <andi@splitbrain.org>2006-02-19 17:47:26 +0100
commite41c4da9b8ec98a022a91b04f7c5d7bbee54b6c9 (patch)
tree7816f31137cbf68df1cefafea8d42a5898f1fc2f /inc/parser/xhtml.php
parent6dbf01ccd365741ffccdaa5a3d0fb2a740035bfa (diff)
downloadrpg-e41c4da9b8ec98a022a91b04f7c5d7bbee54b6c9.tar.gz
rpg-e41c4da9b8ec98a022a91b04f7c5d7bbee54b6c9.tar.bz2
some TOC fixes
darcs-hash:20060219164726-7ad00-eb637e1db83e2f3b6c3629da18214b6587590b24.gz
Diffstat (limited to 'inc/parser/xhtml.php')
-rw-r--r--inc/parser/xhtml.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/inc/parser/xhtml.php b/inc/parser/xhtml.php
index a54e5bcab..9950f28ce 100644
--- a/inc/parser/xhtml.php
+++ b/inc/parser/xhtml.php
@@ -89,7 +89,9 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
}
// prepend the TOC
- $this->doc = $this->render_TOC().$this->doc;
+ if($this->info['toc']){
+ $this->doc = $this->render_TOC().$this->doc;
+ }
}
/**
@@ -98,7 +100,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
* @author Andreas Gohr <andi@splitbrain.org>
*/
function render_TOC(){
- if(!count($this->toc)) return '';
+ if(count($this->toc) < 3) return '';
global $lang;
$out = '<div class="toc">'.DOKU_LF;
$out .= '<div class="tocheader toctoggle" id="toc__header">';
@@ -175,7 +177,6 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
$hid = $this->_headerToLink($text,'true');
//handle TOC
-//FIXME if($this->meta['toc'] &&
if($level >= $conf['toptoclevel'] && $level <= $conf['maxtoclevel']){
// the TOC is one of our standard ul list arrays ;-)
$this->toc[] = array( 'hid' => $hid,