diff options
author | Andreas Gohr <andi@splitbrain.org> | 2009-06-05 19:49:49 +0200 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2009-06-05 19:49:49 +0200 |
commit | a81910eeb4ef1a5c5faf27732de90cc8ea49389b (patch) | |
tree | 97fb3527b03e74250f8d1ce1b63883e79cde1b13 | |
parent | d5b31577462e739910afaf459deb561085a38611 (diff) | |
download | rpg-a81910eeb4ef1a5c5faf27732de90cc8ea49389b.tar.gz rpg-a81910eeb4ef1a5c5faf27732de90cc8ea49389b.tar.bz2 |
Added tpl_include_page() function for template author's convenience
Ignore-this: ab880c4bdaf2e4e8d272f552fd88aa24
darcs-hash:20090605174949-7ad00-3f6fb728f6434c4eba1c2f8613ed53e6f3ee9764.gz
-rw-r--r-- | inc/template.php | 17 |
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 : |