mirror of
https://github.com/e107inc/e107.git
synced 2025-01-17 12:48:24 +01:00
News 'view' template can now use tablerender() when a 'caption' key value is found.
This commit is contained in:
parent
9d2fcaf165
commit
be627b8c7b
@ -111,7 +111,7 @@ $CHAPTER_TEMPLATE['nav']['showPage'] = $CHAPTER_TEMPLATE['nav']['listChapters'];
|
||||
|
||||
// Used by e107_plugins/page/chapter_menu.php & /page.php?bk=x
|
||||
$CHAPTER_TEMPLATE['panel']['listChapters']['caption'] = "{BOOK_NAME}";
|
||||
$CHAPTER_TEMPLATE['panel']['listChapters']['start'] = "<div class='chapter-panel-list'>";
|
||||
$CHAPTER_TEMPLATE['panel']['listChapters']['start'] = "<!-- Chapter Template: Panel listChapters --><div class='chapter-panel-list'>";
|
||||
$CHAPTER_TEMPLATE['panel']['listChapters']['item'] = "<div class='col-xs-12 col-md-4 text-center'>
|
||||
<h2>{CHAPTER_NAME}</h2>
|
||||
<h1><a href='{CHAPTER_URL}' >{CHAPTER_ICON}</a></h1><p>{CHAPTER_DESCRIPTION}</p><p>{CHAPTER_BUTTON}</p></div>";
|
||||
@ -119,12 +119,20 @@ $CHAPTER_TEMPLATE['panel']['listChapters']['end'] = "</div>";
|
||||
|
||||
|
||||
$CHAPTER_TEMPLATE['panel']['listPages']['caption'] = "{CHAPTER_NAME}";
|
||||
$CHAPTER_TEMPLATE['panel']['listPages']['start'] = "{CHAPTER_BREADCRUMB}<div class='chapter-pages-list'>";
|
||||
$CHAPTER_TEMPLATE['panel']['listPages']['start'] = "<!-- Chapter Template: Panel listPages -->{CHAPTER_BREADCRUMB}<div class='chapter-pages-list'>";
|
||||
$CHAPTER_TEMPLATE['panel']['listPages']['item'] = "<div class='section'><div class='row'>{CPAGEMENU}</div></div>";
|
||||
$CHAPTER_TEMPLATE['panel']['listPages']['end'] = "</div>";
|
||||
|
||||
|
||||
$CHAPTER_TEMPLATE['grid']['listChapters']['start'] = "{SETIMAGE: w=450}<div class='row'>";
|
||||
|
||||
$CHAPTER_TEMPLATE['grid']['listPages']['caption'] = "{CHAPTER_NAME}";
|
||||
$CHAPTER_TEMPLATE['grid']['listPages']['start'] = "<!-- Chapter Template: Grid listPages -->{SETIMAGE: w=450}{CHAPTER_BREADCRUMB}<div class='chapter-pages-list'><div class='row'>";
|
||||
$CHAPTER_TEMPLATE['grid']['listPages']['item'] = "<div class='col-xs-12 col-md-4 text-center'>{CPAGEMENU}</div>";
|
||||
$CHAPTER_TEMPLATE['grid']['listPages']['end'] = "</div></div>";
|
||||
|
||||
|
||||
|
||||
$CHAPTER_TEMPLATE['grid']['listChapters']['start'] = "<!-- Chapter Template: Grid listChapters -->{SETIMAGE: w=450}<div class='row'>";
|
||||
$CHAPTER_TEMPLATE['grid']['listChapters']['item'] = "<div class='col-xs-12 col-md-4 text-center'>
|
||||
{CHAPTER_IMAGE}
|
||||
<h2><a href='{CHAPTER_URL}' >{CHAPTER_NAME}</a></h2><p>{CHAPTER_DESCRIPTION}</p><p>{CHAPTER_BUTTON}</p></div>";
|
||||
@ -133,4 +141,3 @@ $CHAPTER_TEMPLATE['grid']['listChapters']['end'] = "</div>";
|
||||
|
||||
|
||||
|
||||
?>
|
@ -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">
|
||||
|
Loading…
x
Reference in New Issue
Block a user