mirror of
https://github.com/e107inc/e107.git
synced 2025-04-13 17:12:07 +02:00
Issue #2806 - Expands on News list template to add specific styling for the first item in the list.
This commit is contained in:
parent
535d85fa33
commit
85e2a67018
@ -77,8 +77,10 @@ class news_admin extends e_admin_dispatcher
|
||||
'main/list' => array('caption'=> LAN_LIST),
|
||||
'main/create' => array('caption'=> NWSLAN_45), // Create/Edit News Item
|
||||
// 'cat/list' => array('caption'=> NWSLAN_46, 'perm' => '7'), // Category List
|
||||
'other' => array('divider'=> true),
|
||||
'cat/list' => array('caption'=> LAN_CATEGORIES), // Create Category.
|
||||
'cat/create' => array('caption'=> LAN_NEWS_63), // Category List
|
||||
'other2' => array('divider'=> true),
|
||||
'main/settings' => array('caption'=> LAN_PREFS), // Preferences
|
||||
// 'main/submitted' => array('caption'=> LAN_NEWS_64, 'perm' => 'N'), // Submitted News
|
||||
'sub/list' => array('caption'=> NWSLAN_47), // Submitted News
|
||||
|
@ -923,7 +923,7 @@ class news_shortcodes extends e_shortcode
|
||||
|
||||
if(empty($imgTag))
|
||||
{
|
||||
return null;
|
||||
return null;
|
||||
}
|
||||
|
||||
switch(vartrue($parm['type']))
|
||||
|
@ -910,9 +910,13 @@ class news_front
|
||||
|
||||
if(!empty($newsList))
|
||||
{
|
||||
$c = 1;
|
||||
foreach($newsList as $row)
|
||||
{
|
||||
$text .= $this->ix->render_newsitem($row, 'return', '', $template['item'], $param);
|
||||
$tpl = ($c === 1 && !empty($template['first'])) ? $template['first'] : $template['item'];
|
||||
|
||||
$text .= $this->ix->render_newsitem($row, 'return', '', $tpl, $param);
|
||||
$c++;
|
||||
}
|
||||
}
|
||||
else // No News - empty.
|
||||
|
@ -33,6 +33,29 @@ $NEWS_INFO = array(
|
||||
// Template/CSS to be reviewed for best bootstrap implementation
|
||||
$NEWS_TEMPLATE['list']['caption'] = '{NEWSCATEGORY}';
|
||||
$NEWS_TEMPLATE['list']['start'] = '{SETIMAGE: w=400&h=350&crop=1}';
|
||||
/*
|
||||
// (optional)
|
||||
$NEWS_TEMPLATE['list']['first'] = '
|
||||
{SETIMAGE: w=800&h=400}
|
||||
<div class="default-item">
|
||||
|
||||
{NEWSIMAGE: item=1}
|
||||
<h2 class="news-title">{NEWS_TITLE: link=1}</h2>
|
||||
<p class="lead">{NEWS_SUMMARY}</p>
|
||||
{NEWSVIDEO: item=1}
|
||||
<div class="text-justify">
|
||||
|
||||
</div>
|
||||
<div class="text-right">
|
||||
<a href="{NEWS_URL}" class="btn btn-primary">{LAN=LAN_READ_MORE}</a>
|
||||
</div>
|
||||
<hr>
|
||||
|
||||
</div>
|
||||
{SETIMAGE: w=400&h=350&crop=1}
|
||||
';
|
||||
*/
|
||||
|
||||
$NEWS_TEMPLATE['list']['end'] = '';
|
||||
$NEWS_TEMPLATE['list']['item'] = '
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user