summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--inc/actions.php8
-rw-r--r--inc/template.php2
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'])){