1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-30 01:30:32 +02:00

News Grid template simplified. Template/Layout combination consolidated into 'layout' only.

This commit is contained in:
Cameron
2017-02-13 18:14:26 -08:00
parent 4fa8e47247
commit f6612410e0
5 changed files with 81 additions and 30 deletions

View File

@@ -60,14 +60,14 @@ if(false === $cached)
}
else // New in v2.1.5
{
$tmpl = !empty($parms['template']) ? $parms['template'] : 'default';
$tmpl = !empty($parms['layout']) ? $parms['layout'] : 'col-md-4';
$template = e107::getTemplate('news', 'news_grid', $tmpl);
$parms['tmpl'] = 'news_grid';
$parms['tmpl_key'] = $tmpl;
}
$gridSize = vartrue($parms['layout'],'col-md-4');
// $gridSize = vartrue($parms['layout'],'col-md-4');
$parmSrch = array(
'{NEWSGRID}',
@@ -76,12 +76,12 @@ if(false === $cached)
);
$parmReplace = array(
$gridSize,
vartrue($parms['titleLimit'], 0),
vartrue($parms['summaryLimit'], 0)
// $gridSize,
// vartrue($parms['titleLimit'], 0),
// vartrue($parms['summaryLimit'], 0)
);
$template = str_replace($parmSrch , $parmReplace, $template);
$template = str_replace($parmSrch , '', $template); // clean up deprecated elements.
$render = (empty($parms['caption'])) ? false: true;