1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-17 04:38:27 +01:00

Fixes #1757 - Page 'related' items template.

This commit is contained in:
Cameron 2016-07-01 16:10:24 -07:00
parent d44a92dcba
commit d511bb6c9a
2 changed files with 17 additions and 2 deletions

View File

@ -534,8 +534,13 @@ class cpage_shortcodes extends e_shortcode
{
$array['types'] = 'page,news';
}
return e107::getForm()->renderRelated($array, $this->var['page_metakeys'], array('page'=>$this->var['page_id']));
$templateID = vartrue($this->var['page_template'],'default');
$template = e107::getCoreTemplate('page', $templateID);
return e107::getForm()->renderRelated($array, $this->var['page_metakeys'], array('page'=>$this->var['page_id']), $template['related']);
}

View File

@ -94,8 +94,18 @@ $sc_style['CPAGENAV|default']['post'] = '</div>';
// define different tablerender mode here
$PAGE_TEMPLATE['default']['tableRender'] = 'cpage';
$PAGE_TEMPLATE['default']['related']['start'] = '{SETIMAGE: w=350&h=350&crop=1}<h2 class="caption">{LAN=LAN_RELATED}</h2><div class="row">';
$PAGE_TEMPLATE['default']['related']['item'] = '<div class="col-md-4"><a href="{RELATED_URL}">{RELATED_IMAGE}</a><h3><a href="{RELATED_URL}">{RELATED_TITLE}</a></h3></div>';
$PAGE_TEMPLATE['default']['related']['end'] = '</div>';
#### No table render example template ####
$PAGE_TEMPLATE['custom']['start'] = '<div id="{CPAGESEF}" class="cpage-body">';
$PAGE_TEMPLATE['custom']['body'] = '';
$PAGE_TEMPLATE['custom']['authorize'] = '