1
0
mirror of https://github.com/e107inc/e107.git synced 2025-04-21 05:02:02 +02:00

News List caption option added to v2 template (same as $NEWSLISTTITLE in v1.x)

This commit is contained in:
Cameron 2013-11-22 17:08:38 -08:00
parent 39786cb670
commit 305d7d2ec9
2 changed files with 7 additions and 2 deletions

View File

@ -23,6 +23,7 @@ $NEWS_MENU_TEMPLATE['list']['end'] = '</div>';
// {NEWSBODY} should not appear in the LISTSTYLE as it is NOT the same as what would appear on news.php (no query)
// Template/CSS to be reviewed for best bootstrap implementation
$NEWS_TEMPLATE['list']['caption'] = '{NEWSCATEGORY}';
$NEWS_TEMPLATE['list']['start'] = '{SETIMAGE: w=400&h=300&crop=1}';
$NEWS_TEMPLATE['list']['end'] = '';
$NEWS_TEMPLATE['list']['item'] = '

View File

@ -275,11 +275,15 @@ if ($action == 'cat' || $action == 'all' || vartrue($_GET['tag']))
$text .= $tp->parseTemplate("{NEXTPREV={$parms}}");
if(!$NEWSLISTTITLE)
if(varset($template['caption'])) // v2.x
{
$NEWSLISTTITLE = str_replace("{NEWSCATEGORY}",$tp->toHTML($category_name,FALSE,'TITLE'), $template['caption']);
}
elseif(!$NEWSLISTTITLE) // default
{
$NEWSLISTTITLE = LAN_NEWS_82." '".$tp->toHTML($category_name,FALSE,'TITLE')."'";
}
else
else // v1.x
{
$NEWSLISTTITLE = str_replace("{NEWSCATEGORY}",$tp->toHTML($category_name,FALSE,'TITLE'),$NEWSLISTTITLE);
}