Skip to content

Commit

Permalink
Improve code, remove separator
Browse files Browse the repository at this point in the history
  • Loading branch information
chmst committed Sep 26, 2020
1 parent 2f40e16 commit 0c5ca65
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions modules/mod_articles_news/tmpl/horizontal.php
Expand Up @@ -15,21 +15,16 @@
$wa = $app->getDocument()->getWebAssetManager();
$wa->registerAndUseStyle('mod_modules', 'mod_articles_news/template.css');

if (!$list)
if (empty($list))
{
return;
}

?>
<ul class="mod-articlesnews-horizontal newsflash-horiz mod-list">
<?php for ($i = 0, $n = count($list); $i < $n; $i ++) : ?>
<?php $item = $list[$i]; ?>
<?php foreach ($list as $item) : ?>
<li>
<?php require ModuleHelper::getLayoutPath('mod_articles_news', '_item'); ?>

<?php if ($n > 1 && (($i < $n - 1) || $params->get('showLastSeparator'))) : ?>
<span class="article-separator">&#160;</span>
<?php endif; ?>
</li>
<?php endfor; ?>
<?php endforeach; ?>
</ul>

0 comments on commit 0c5ca65

Please sign in to comment.