summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--inc/template.php18
-rw-r--r--lib/tpl/dokuwiki/main.php2
2 files changed, 6 insertions, 14 deletions
diff --git a/inc/template.php b/inc/template.php
index 9f17d5e32..d0b1d3e85 100644
--- a/inc/template.php
+++ b/inc/template.php
@@ -1465,14 +1465,17 @@ function tpl_license($img = 'badge', $imgonly = false, $return = false, $wrap =
}
/**
- * Includes the rendered XHTML of a given page
+ * Includes the rendered HTML of a given page
*
* This function is useful to populate sidebars or similar features in a
* template
*/
-function tpl_include_page($pageid, $print = true) {
+function tpl_include_page($pageid, $print = true, $propagate = false) {
global $ID;
global $TOC;
+
+ if ($propagate) $pageid = page_findnearest($pageid);
+
$oldid = $ID;
$oldtoc = $TOC;
$html = p_wiki_xhtml($pageid, '', false);
@@ -1485,17 +1488,6 @@ function tpl_include_page($pageid, $print = true) {
}
/**
- * Include the sidebar, will check current namespaces first
- */
-function tpl_sidebar($print = true) {
- global $conf;
-
- $sidebar = page_findnearest($conf['sidebar']);
- if($sidebar) return tpl_include_page($sidebar, $print);
- return '';
-}
-
-/**
* Display the subscribe form
*
* @author Adrian Lang <lang@cosmocode.de>
diff --git a/lib/tpl/dokuwiki/main.php b/lib/tpl/dokuwiki/main.php
index 6b1e95d62..820dd47df 100644
--- a/lib/tpl/dokuwiki/main.php
+++ b/lib/tpl/dokuwiki/main.php
@@ -42,7 +42,7 @@ $showSidebar = $hasSidebar && ($ACT=='show');
<div class="content">
<?php tpl_flush() ?>
<?php tpl_includeFile('sidebarheader.html') ?>
- <?php tpl_sidebar() ?>
+ <?php tpl_include_page($conf['sidebar'], 1, 1) ?>
<?php tpl_includeFile('sidebarfooter.html') ?>
</div>
</div></div><!-- /aside -->