summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--inc/template.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/inc/template.php b/inc/template.php
index 980fc744c..6e8c0d718 100644
--- a/inc/template.php
+++ b/inc/template.php
@@ -1334,5 +1334,22 @@ function tpl_license($img='badge',$imgonly=false,$return=false){
echo $out;
}
+
+/**
+ * Includes the rendered XHTML of a given page
+ *
+ * This function is useful to populate sidebars or similar features in a
+ * template
+ */
+function tpl_include_page($pageid,$print=true){
+ global $ID;
+ $oldid = $ID;
+ $html = p_wiki_xhtml($pageid,'',false);
+ $ID = $oldid;
+
+ if(!$print) return $html;
+ echo $html;
+}
+
//Setup VIM: ex: et ts=4 enc=utf-8 :