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

News 'view' template can now use tablerender() when a 'caption' key value is found.

This commit is contained in:
Cameron
2019-06-06 14:24:37 -07:00
parent 9d2fcaf165
commit be627b8c7b
3 changed files with 22 additions and 4 deletions

View File

@@ -1149,6 +1149,15 @@ class news_front
}
$template = $tmp['item'];
if(isset($tmp['caption']) && $tmp['caption'] !== null) // to initiate tablerender() usage.
{
$this->addDebug('Internal Route', $this->route);
$this->route = 'news/view'; // used for tablerender id.
$this->templateKey = $newsViewTemplate; // used for tablerender id.
$this->caption = e107::getParser()->parseTemplate($tmp['caption'], true, $news);
}
unset($tmp);
}

View File

@@ -21,6 +21,8 @@ $NEWS_VIEW_INFO = array(
// Default
$NEWS_VIEW_WRAPPER['default']['item']['NEWSIMAGE: item=1'] = '<span class="news-images-main pull-left col-xs-12 col-sm-6 col-md-6">{---}</span>';
$NEWS_VIEW_TEMPLATE['default']['caption'] = null; // add a value to user tablerender()
$NEWS_VIEW_TEMPLATE['default']['item'] = '
{SETIMAGE: w=900&h=600}
<div class="view-item">