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:
@@ -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);
|
||||
}
|
||||
|
||||
|
@@ -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">
|
||||
|
Reference in New Issue
Block a user