Pluggable page templates

This commit is contained in:
Thomas Willingham 2014-09-29 15:13:39 +01:00
parent f7595cc11a
commit 9de5b6b905

View file

@ -1341,8 +1341,10 @@ function prepare_page($item) {
// the template will get passed an unobscured title.
$body = prepare_body($item,true);
return replace_macros(get_markup_template('page_display.tpl'),array(
$tpl = get_pconfig($item['uid'],'system','pagetemplate');
if (! $tpl)
$tpl = 'page_display.tpl';
return replace_macros(get_markup_template($tpl),array(
'$author' => (($naked) ? '' : $item['author']['xchan_name']),
'$auth_url' => (($naked) ? '' : zid($item['author']['xchan_url'])),
'$date' => (($naked) ? '' : datetime_convert('UTC',date_default_timezone_get(),$item['created'],'Y-m-d H:i')),