mirror of
https://github.com/e107inc/e107.git
synced 2025-08-02 12:48:26 +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:
@@ -77,8 +77,10 @@ class news_admin extends e_admin_dispatcher
|
|||||||
'main/list' => array('caption'=> LAN_LIST),
|
'main/list' => array('caption'=> LAN_LIST),
|
||||||
'main/create' => array('caption'=> NWSLAN_45), // Create/Edit News Item
|
'main/create' => array('caption'=> NWSLAN_45), // Create/Edit News Item
|
||||||
// 'cat/list' => array('caption'=> NWSLAN_46, 'perm' => '7'), // Category List
|
// 'cat/list' => array('caption'=> NWSLAN_46, 'perm' => '7'), // Category List
|
||||||
|
'other' => array('divider'=> true),
|
||||||
'cat/list' => array('caption'=> LAN_CATEGORIES), // Create Category.
|
'cat/list' => array('caption'=> LAN_CATEGORIES), // Create Category.
|
||||||
'cat/create' => array('caption'=> LAN_NEWS_63), // Category List
|
'cat/create' => array('caption'=> LAN_NEWS_63), // Category List
|
||||||
|
'other2' => array('divider'=> true),
|
||||||
'main/settings' => array('caption'=> LAN_PREFS), // Preferences
|
'main/settings' => array('caption'=> LAN_PREFS), // Preferences
|
||||||
// 'main/submitted' => array('caption'=> LAN_NEWS_64, 'perm' => 'N'), // Submitted News
|
// 'main/submitted' => array('caption'=> LAN_NEWS_64, 'perm' => 'N'), // Submitted News
|
||||||
'sub/list' => array('caption'=> NWSLAN_47), // Submitted News
|
'sub/list' => array('caption'=> NWSLAN_47), // Submitted News
|
||||||
|
@@ -923,7 +923,7 @@ class news_shortcodes extends e_shortcode
|
|||||||
|
|
||||||
if(empty($imgTag))
|
if(empty($imgTag))
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch(vartrue($parm['type']))
|
switch(vartrue($parm['type']))
|
||||||
|
@@ -910,9 +910,13 @@ class news_front
|
|||||||
|
|
||||||
if(!empty($newsList))
|
if(!empty($newsList))
|
||||||
{
|
{
|
||||||
|
$c = 1;
|
||||||
foreach($newsList as $row)
|
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.
|
else // No News - empty.
|
||||||
|
@@ -33,6 +33,29 @@ $NEWS_INFO = array(
|
|||||||
// Template/CSS to be reviewed for best bootstrap implementation
|
// Template/CSS to be reviewed for best bootstrap implementation
|
||||||
$NEWS_TEMPLATE['list']['caption'] = '{NEWSCATEGORY}';
|
$NEWS_TEMPLATE['list']['caption'] = '{NEWSCATEGORY}';
|
||||||
$NEWS_TEMPLATE['list']['start'] = '{SETIMAGE: w=400&h=350&crop=1}';
|
$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']['end'] = '';
|
||||||
$NEWS_TEMPLATE['list']['item'] = '
|
$NEWS_TEMPLATE['list']['item'] = '
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user