Skip to content

Commit

Permalink
[4.0] mod_article_news readmore (#30780)
Browse files Browse the repository at this point in the history
This PR simply changes the Article News module to use the existing joomla.content.readmore layout
  • Loading branch information
brianteeman authored Sep 27, 2020
1 parent b1d754a commit 0f3af5e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions modules/mod_articles_news/tmpl/_item.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
*/

defined('_JEXEC') or die;

use Joomla\CMS\Layout\LayoutHelper;
?>
<?php if ($params->get('item_title')) : ?>

Expand All @@ -23,7 +25,7 @@
</<?php echo $item_heading; ?>>
<?php endif; ?>

<?php if ($params->get('img_intro_full') !== 'none' && !empty($item->imageSrc)) : ?>
<?php if ($params->get('img_intro_full') !== 'none' && !empty($item->imageSrc)) : ?>
<figure class="newsflash-image">
<img src="<?php echo $item->imageSrc; ?>" alt="<?php echo $item->imageAlt; ?>">
<?php if (!empty($item->imageCaption)) : ?>
Expand All @@ -47,5 +49,5 @@
<?php echo $item->afterDisplayContent; ?>

<?php if (isset($item->link) && $item->readmore != 0 && $params->get('readmore')) : ?>
<?php echo '<a class="readmore" href="' . $item->link . '">' . $item->linkText . '</a>'; ?>
<?php echo LayoutHelper::render('joomla.content.readmore', array('item' => $item, 'params' => $item->params, 'link' => $item->link)); ?>
<?php endif; ?>

0 comments on commit 0f3af5e

Please sign in to comment.