first commit
This commit is contained in:
59
modules/mod_articles_news/tmpl/_item.php
Normal file
59
modules/mod_articles_news/tmpl/_item.php
Normal file
@ -0,0 +1,59 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage mod_articles_news
|
||||
*
|
||||
* @copyright (C) 2010 Open Source Matters, Inc. <https://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Layout\LayoutHelper;
|
||||
?>
|
||||
<?php if ($params->get('item_title')) : ?>
|
||||
<?php $item_heading = $params->get('item_heading', 'h4'); ?>
|
||||
<<?php echo $item_heading; ?> class="newsflash-title">
|
||||
<?php if ($item->link !== '' && $params->get('link_titles')) : ?>
|
||||
<a href="<?php echo $item->link; ?>">
|
||||
<?php echo $item->title; ?>
|
||||
</a>
|
||||
<?php else : ?>
|
||||
<?php echo $item->title; ?>
|
||||
<?php endif; ?>
|
||||
</<?php echo $item_heading; ?>>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($params->get('img_intro_full') !== 'none' && !empty($item->imageSrc)) : ?>
|
||||
<figure class="newsflash-image">
|
||||
<?php echo LayoutHelper::render(
|
||||
'joomla.html.image',
|
||||
[
|
||||
'src' => $item->imageSrc,
|
||||
'alt' => $item->imageAlt,
|
||||
]
|
||||
); ?>
|
||||
<?php if (!empty($item->imageCaption)) : ?>
|
||||
<figcaption>
|
||||
<?php echo $item->imageCaption; ?>
|
||||
</figcaption>
|
||||
<?php endif; ?>
|
||||
</figure>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (!$params->get('intro_only')) : ?>
|
||||
<?php echo $item->afterDisplayTitle; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php echo $item->beforeDisplayContent; ?>
|
||||
|
||||
<?php if ($params->get('show_introtext', 1)) : ?>
|
||||
<?php echo $item->introtext; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php echo $item->afterDisplayContent; ?>
|
||||
|
||||
<?php if (isset($item->link) && $item->readmore != 0 && $params->get('readmore')) : ?>
|
||||
<?php echo LayoutHelper::render('joomla.content.readmore', ['item' => $item, 'params' => $item->params, 'link' => $item->link]); ?>
|
||||
<?php endif; ?>
|
||||
26
modules/mod_articles_news/tmpl/default.php
Normal file
26
modules/mod_articles_news/tmpl/default.php
Normal file
@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage mod_articles_news
|
||||
*
|
||||
* @copyright (C) 2006 Open Source Matters, Inc. <https://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Helper\ModuleHelper;
|
||||
|
||||
if (!$list) {
|
||||
return;
|
||||
}
|
||||
|
||||
?>
|
||||
<div class="mod-articlesnews newsflash">
|
||||
<?php foreach ($list as $item) : ?>
|
||||
<div class="mod-articlesnews__item" itemscope itemtype="https://schema.org/Article">
|
||||
<?php require ModuleHelper::getLayoutPath('mod_articles_news', '_item'); ?>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
30
modules/mod_articles_news/tmpl/horizontal.php
Normal file
30
modules/mod_articles_news/tmpl/horizontal.php
Normal file
@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage mod_articles_news
|
||||
*
|
||||
* @copyright (C) 2006 Open Source Matters, Inc. <https://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Helper\ModuleHelper;
|
||||
|
||||
/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
|
||||
$wa = $app->getDocument()->getWebAssetManager();
|
||||
$wa->registerAndUseStyle('mod_articles_news_horizontal', 'mod_articles_news/template.css');
|
||||
|
||||
if (empty($list)) {
|
||||
return;
|
||||
}
|
||||
|
||||
?>
|
||||
<ul class="mod-articlesnews-horizontal newsflash-horiz mod-list">
|
||||
<?php foreach ($list as $item) : ?>
|
||||
<li itemscope itemtype="https://schema.org/Article">
|
||||
<?php require ModuleHelper::getLayoutPath('mod_articles_news', '_item'); ?>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
35
modules/mod_articles_news/tmpl/vertical.php
Normal file
35
modules/mod_articles_news/tmpl/vertical.php
Normal file
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage mod_articles_news
|
||||
*
|
||||
* @copyright (C) 2006 Open Source Matters, Inc. <https://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Helper\ModuleHelper;
|
||||
|
||||
/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
|
||||
$wa = $app->getDocument()->getWebAssetManager();
|
||||
$wa->registerAndUseStyle('mod_articles_news_vertical', 'mod_articles_news/template-vert.css');
|
||||
|
||||
if (!$list) {
|
||||
return;
|
||||
}
|
||||
|
||||
?>
|
||||
<ul class="mod-articlesnews-vertical newsflash-vert mod-list">
|
||||
<?php for ($i = 0, $n = count($list); $i < $n; $i++) : ?>
|
||||
<?php $item = $list[$i]; ?>
|
||||
<li class="newsflash-item" itemscope itemtype="https://schema.org/Article">
|
||||
<?php require ModuleHelper::getLayoutPath('mod_articles_news', '_item'); ?>
|
||||
|
||||
<?php if ($n > 1 && (($i < $n - 1) || $params->get('showLastSeparator'))) : ?>
|
||||
<span class="article-separator"> </span>
|
||||
<?php endif; ?>
|
||||
</li>
|
||||
<?php endfor; ?>
|
||||
</ul>
|
||||
Reference in New Issue
Block a user