From a81910eeb4ef1a5c5faf27732de90cc8ea49389b Mon Sep 17 00:00:00 2001 From: Andreas Gohr <andi@splitbrain.org> Date: Fri, 5 Jun 2009 19:49:49 +0200 Subject: [PATCH] Added tpl_include_page() function for template author's convenience Ignore-this: ab880c4bdaf2e4e8d272f552fd88aa24 darcs-hash:20090605174949-7ad00-3f6fb728f6434c4eba1c2f8613ed53e6f3ee9764.gz --- inc/template.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) 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 : -- GitLab