diff options
author | Andreas Gohr <andi@splitbrain.org> | 2008-05-04 11:24:10 +0200 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2008-05-04 11:24:10 +0200 |
commit | 3c86d7c93eae19fe1921ee3da001a182f895dfa2 (patch) | |
tree | 265da560112d422b61121e58ecdde8337985bbaf | |
parent | 9291cf33edfd5af1f7c1439526d15c95467956ce (diff) | |
download | rpg-3c86d7c93eae19fe1921ee3da001a182f895dfa2.tar.gz rpg-3c86d7c93eae19fe1921ee3da001a182f895dfa2.tar.bz2 |
Fixed TOC for HTML export modes FS#1384
darcs-hash:20080504092410-7ad00-ec386b1e897c1afbf3fd9e9a68867c4284225f72.gz
-rw-r--r-- | inc/actions.php | 8 | ||||
-rw-r--r-- | inc/template.php | 2 |
2 files changed, 7 insertions, 3 deletions
diff --git a/inc/actions.php b/inc/actions.php index c0f85c97a..24516e5d5 100644 --- a/inc/actions.php +++ b/inc/actions.php @@ -392,7 +392,9 @@ function act_export($act){ ptln('</head>'); ptln('<body>'); ptln('<div class="dokuwiki export">'); - print p_wiki_xhtml($ID,$REV,false); + $html = p_wiki_xhtml($ID,$REV,false); + tpl_toc(); + echo $html; ptln('</div>'); ptln('</body>'); ptln('</html>'); @@ -401,7 +403,9 @@ function act_export($act){ // html body only if($act == 'export_xhtmlbody'){ - print p_wiki_xhtml($ID,$REV,false); + $html = p_wiki_xhtml($ID,$REV,false); + tpl_toc(); + echo $html; exit; } diff --git a/inc/template.php b/inc/template.php index 5544dc02e..efd921f7d 100644 --- a/inc/template.php +++ b/inc/template.php @@ -152,7 +152,7 @@ function tpl_toc($return=false){ if(is_array($TOC)){ // if a TOC was prepared in global scope, always use it $toc = $TOC; - }elseif($ACT == 'show' && !$REV && $INFO['exists']){ + }elseif(($ACT == 'show' || substr($ACT,0,6) == 'export') && !$REV && $INFO['exists']){ // get TOC from metadata, render if neccessary $meta = p_get_metadata($ID, false, true); if(isset($meta['internal']['toc'])){ |