summaryrefslogtreecommitdiff
path: root/inc/template.php
diff options
context:
space:
mode:
Diffstat (limited to 'inc/template.php')
-rw-r--r--inc/template.php22
1 files changed, 6 insertions, 16 deletions
diff --git a/inc/template.php b/inc/template.php
index 2dc58b36d..0d96be214 100644
--- a/inc/template.php
+++ b/inc/template.php
@@ -1465,18 +1465,19 @@ 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;
- $oldid = $ID;
+
+ if ($propagate) $pageid = page_findnearest($pageid);
+
$oldtoc = $TOC;
$html = p_wiki_xhtml($pageid, '', false);
- $ID = $oldid;
$TOC = $oldtoc;
if(!$print) return $html;
@@ -1485,17 +1486,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>
@@ -1693,7 +1683,7 @@ function tpl_favicon($types = array('favicon')) {
$return .= '<link rel="shortcut icon" href="'.tpl_getMediaFile($look).'" />'.NL;
break;
case 'mobile':
- $look = array(':wiki:apple-touch-icon.png', ':apple-touch-icon.png', 'images/apple-touch-icon.ico');
+ $look = array(':wiki:apple-touch-icon.png', ':apple-touch-icon.png', 'images/apple-touch-icon.png');
$return .= '<link rel="apple-touch-icon" href="'.tpl_getMediaFile($look).'" />'.NL;
break;
case 'generic':