Skip to content
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
08cd724
Fix images
dgrammatiko Oct 7, 2021
7fd6a59
menus
dgrammatiko Oct 7, 2021
f2bfbad
Update components/com_contact/tmpl/category/default_items.php
dgrammatiko Oct 8, 2021
ce2e00f
more
dgrammatiko Oct 8, 2021
e10da79
one more
dgrammatiko Oct 8, 2021
45ec5c4
more
dgrammatiko Oct 8, 2021
dc10268
Update components/com_contact/tmpl/contact/default.php
dgrammatiko Oct 8, 2021
7962abb
Update components/com_content/tmpl/category/blog.php
dgrammatiko Oct 8, 2021
c8132ff
Update components/com_newsfeeds/tmpl/category/default.php
dgrammatiko Oct 8, 2021
9a0f4d7
Update components/com_newsfeeds/tmpl/newsfeed/default.php
dgrammatiko Oct 8, 2021
6657f4c
Update components/com_newsfeeds/tmpl/newsfeed/default.php
dgrammatiko Oct 8, 2021
60633dc
Update modules/mod_articles_news/tmpl/_item.php
dgrammatiko Oct 8, 2021
5d051b0
Update components/com_newsfeeds/tmpl/newsfeed/default.php
dgrammatiko Oct 9, 2021
9bed5fc
Undo menu changes, proper invocation of HTMLHelper
dgrammatiko Oct 10, 2021
ee4c197
one more
dgrammatiko Oct 10, 2021
8738949
Use a Layout
dgrammatiko Oct 23, 2021
9aae3cd
one more
dgrammatiko Oct 23, 2021
6810fad
Update components/com_contact/tmpl/contact/default.php
dgrammatiko Oct 23, 2021
707d717
Update components/com_contact/tmpl/contact/default.php
dgrammatiko Oct 23, 2021
47291e5
Update components/com_contact/tmpl/category/default_items.php
dgrammatiko Oct 30, 2021
9d43461
Update components/com_contact/tmpl/contact/default.php
dgrammatiko Oct 30, 2021
5348c56
Update components/com_content/tmpl/category/blog.php
dgrammatiko Oct 30, 2021
19d99ea
Update components/com_newsfeeds/tmpl/category/default.php
dgrammatiko Oct 30, 2021
dd36e11
Update components/com_newsfeeds/tmpl/newsfeed/default.php
dgrammatiko Oct 30, 2021
38e61c8
Update modules/mod_articles_news/tmpl/_item.php
dgrammatiko Oct 30, 2021
8efc2a2
Update components/com_newsfeeds/tmpl/newsfeed/default.php
dgrammatiko Oct 30, 2021
1c8d811
Update components/com_newsfeeds/tmpl/newsfeed/default.php
dgrammatiko Oct 30, 2021
d50b8b0
Simplify the layout/data/etc
dgrammatiko Nov 3, 2021
687d583
meh
dgrammatiko Nov 3, 2021
4c54bb5
Redo
dgrammatiko Nov 3, 2021
6f67b9f
Update image.php
dgrammatiko Nov 4, 2021
a2b71cb
Update layouts/joomla/html/image.php
dgrammatiko Nov 4, 2021
9061a45
Update image.php
dgrammatiko Nov 5, 2021
27d1bc4
Replace title with figure/figcaprion
dgrammatiko Nov 6, 2021
e95e9ee
Update image.php
dgrammatiko Nov 6, 2021
2557b33
Update modules/mod_articles_news/tmpl/_item.php
dgrammatiko Nov 6, 2021
885d9ec
One common jlayout for all images
dgrammatiko Dec 22, 2021
c5fa812
Meh
dgrammatiko Dec 22, 2021
1ce9cf4
oops
dgrammatiko Dec 22, 2021
bcaa805
Remove double escaping
dgrammatiko Dec 23, 2021
a32c810
Remove double escaping
dgrammatiko Dec 23, 2021
6a1dcc6
simplify, the loading part, revert some CS
dgrammatiko Dec 25, 2021
7f2f4fc
Remove unused imports
dgrammatiko Dec 25, 2021
0990be1
use escape in the jLayouts
dgrammatiko Dec 25, 2021
fbbb8cc
Update components/com_content/tmpl/category/blog.php
dgrammatiko Dec 25, 2021
ba3250b
Update components/com_content/tmpl/category/blog.php
dgrammatiko Dec 25, 2021
b976276
Update components/com_newsfeeds/tmpl/newsfeed/default.php
dgrammatiko Dec 25, 2021
1877d55
Update layouts/joomla/html/image.php
dgrammatiko Dec 25, 2021
282fa98
Update modules/mod_articles_news/tmpl/_item.php
dgrammatiko Dec 25, 2021
bf34ca0
Update layouts/joomla/html/image.php
dgrammatiko Dec 26, 2021
4fd81ee
Update components/com_contact/tmpl/category/default_items.php
dgrammatiko Dec 26, 2021
7f312c1
Update layouts/joomla/content/intro_image.php
dgrammatiko Dec 28, 2021
4b64a15
Update components/com_newsfeeds/tmpl/newsfeed/default.php
dgrammatiko Dec 28, 2021
9cc8b33
Update components/com_newsfeeds/tmpl/newsfeed/default.php
dgrammatiko Dec 28, 2021
4865886
comment
dgrammatiko Dec 28, 2021
d0bbb00
the obj reurned from cleanImageURL has a url and attributes
dgrammatiko Dec 30, 2021
6fce942
Update layouts/joomla/html/image.php
dgrammatiko Dec 30, 2021
19ac361
Remove extra isset
dgrammatiko Dec 30, 2021
cad01eb
Update image.php
dgrammatiko Dec 30, 2021
020c806
meh
dgrammatiko Dec 30, 2021
6badaac
use escape
dgrammatiko Dec 30, 2021
bba0545
Update layouts/joomla/html/image.php
dgrammatiko Dec 30, 2021
a782b24
Add missing category image
dgrammatiko Dec 31, 2021
1ec83be
Respect the no Description checkbox
dgrammatiko Dec 31, 2021
d0ba9b8
DO NOT UNSET OBJECT PARTS!
dgrammatiko Dec 31, 2021
49c8ff6
Skip double escaping
dgrammatiko Dec 31, 2021
4d5ff42
CS
dgrammatiko Dec 31, 2021
8f4d6d2
Update components/com_newsfeeds/tmpl/newsfeed/default.php
dgrammatiko Dec 31, 2021
0da6cb4
Merge branch '4.0-dev' into 4.0-dev-images
dgrammatiko Jan 3, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion components/com_contact/tmpl/category/default_items.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Layout\LayoutHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Uri\Uri;
use Joomla\Component\Contact\Administrator\Helper\ContactHelper;
Expand Down Expand Up @@ -99,7 +100,15 @@ class="inputbox" onchange="document.adminForm.submit();"
<a href="<?php echo Route::_(RouteHelper::getContactRoute($item->slug, $item->catid, $item->language)); ?>">
<?php if ($this->params->get('show_image_heading')) : ?>
<?php if ($item->image) : ?>
<?php echo HTMLHelper::_('image', $item->image, '', array('class' => 'contact-thumbnail img-thumbnail')); ?>
<?php echo LayoutHelper::render(
'joomla.html.image',
[
'image' => [
'src' => $item->image,
'alt' => '',
'attributes' => ['class' => 'contact-thumbnail img-thumbnail']
],
]); ?>
<?php endif; ?>
<?php endif; ?>
<?php echo $this->escape($item->name); ?>
Expand Down
25 changes: 17 additions & 8 deletions components/com_contact/tmpl/contact/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Layout\FileLayout;
use Joomla\CMS\Layout\LayoutHelper;
use Joomla\CMS\Plugin\PluginHelper;
use Joomla\CMS\Router\Route;
use Joomla\Component\Contact\Site\Helper\RouteHelper;
Expand Down Expand Up @@ -62,7 +63,7 @@
<?php $contactLink = RouteHelper::getCategoryRoute($this->item->catid, $this->item->language); ?>
<h3>
<span class="contact-category"><a href="<?php echo $contactLink; ?>">
<?php echo $this->escape($this->item->category_title); ?></a>
<?php echo $this->escape($this->item->category_title); ?></a>
</span>
</h3>
<?php endif; ?>
Expand All @@ -76,7 +77,11 @@
'select.genericlist',
$this->contacts,
'select_contact',
'class="form-select" onchange="document.location.href = this.value"', 'link', 'name', $this->item->link);
'class="form-select" onchange="document.location.href = this.value"',
'link',
'name',
$this->item->link
);
?>
</form>
<?php endif; ?>
Expand All @@ -97,11 +102,15 @@

<?php if ($this->item->image && $tparams->get('show_image')) : ?>
<div class="com-contact__thumbnail thumbnail">
<?php echo HTMLHelper::_(
'image',
$this->item->image,
htmlspecialchars($this->item->name, ENT_QUOTES, 'UTF-8'),
array('itemprop' => 'image')
<?php echo LayoutHelper::render(
'joomla.html.image',
[
'image' => [
'src' => $this->item->image,
'alt' => $this->item->name,
'attributes' => ['itemprop' => 'image']
],
]
); ?>
</div>
<?php endif; ?>
Expand All @@ -121,7 +130,7 @@
<?php if ($tparams->get('allow_vcard')) : ?>
<?php echo Text::_('COM_CONTACT_DOWNLOAD_INFORMATION_AS'); ?>
<a href="<?php echo Route::_('index.php?option=com_contact&amp;view=contact&amp;id=' . $this->item->id . '&amp;format=vcf'); ?>">
<?php echo Text::_('COM_CONTACT_VCARD'); ?></a>
<?php echo Text::_('COM_CONTACT_VCARD'); ?></a>
<?php endif; ?>
</div>
</div>
Expand Down
44 changes: 26 additions & 18 deletions components/com_content/tmpl/category/blog.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Layout\FileLayout;
use Joomla\CMS\Layout\LayoutHelper;

$app = Factory::getApplication();

Expand Down Expand Up @@ -40,9 +41,9 @@
<?php endif; ?>

<?php if ($this->params->get('show_category_title', 1)) : ?>
<<?php echo $htag; ?>>
<?php echo $this->category->title; ?>
</<?php echo $htag; ?>>
<<?php echo $htag; ?>>
<?php echo $this->category->title; ?>
</<?php echo $htag; ?>>
<?php endif; ?>
<?php echo $afterDisplayTitle; ?>

Expand All @@ -54,8 +55,16 @@
<?php if ($beforeDisplayContent || $afterDisplayContent || $this->params->get('show_description', 1) || $this->params->def('show_description_image', 1)) : ?>
<div class="category-desc clearfix">
<?php if ($this->params->get('show_description_image') && $this->category->getParams()->get('image')) : ?>
<?php $alt = empty($this->category->getParams()->get('image_alt')) && empty($this->category->getParams()->get('image_alt_empty')) ? '' : 'alt="' . htmlspecialchars($this->category->getParams()->get('image_alt'), ENT_COMPAT, 'UTF-8') . '"'; ?>
<img src="<?php echo $this->category->getParams()->get('image'); ?>" <?php echo $alt; ?>>
<?php echo LayoutHelper::render(
'joomla.html.image',
[
'image' => [
'src' => $this->category->getParams()->get('image'),
'alt' => empty($this->category->getParams()->get('image_alt')) && empty($this->category->getParams()->get('image_alt_empty')) ? '' : $this->category->getParams()->get('image_alt'),
'attributes' => []
],
]
); ?>
<?php endif; ?>
<?php echo $beforeDisplayContent; ?>
<?php if ($this->params->get('show_description') && $this->category->description) : ?>
Expand All @@ -75,12 +84,11 @@
<?php if (!empty($this->lead_items)) : ?>
<div class="com-content-category-blog__items blog-items items-leading <?php echo $this->params->get('blog_class_leading'); ?>">
<?php foreach ($this->lead_items as &$item) : ?>
<div class="com-content-category-blog__item blog-item"
itemprop="blogPost" itemscope itemtype="https://schema.org/BlogPosting">
<?php
$this->item = & $item;
echo $this->loadTemplate('item');
?>
<div class="com-content-category-blog__item blog-item" itemprop="blogPost" itemscope itemtype="https://schema.org/BlogPosting">
<?php
$this->item = &$item;
echo $this->loadTemplate('item');
?>
</div>
<?php $leadingcount++; ?>
<?php endforeach; ?>
Expand All @@ -99,15 +107,14 @@
<?php $blogClass .= (int) $this->params->get('num_columns'); ?>
<?php endif; ?>
<div class="com-content-category-blog__items blog-items <?php echo $blogClass; ?>">
<?php foreach ($this->intro_items as $key => &$item) : ?>
<div class="com-content-category-blog__item blog-item"
itemprop="blogPost" itemscope itemtype="https://schema.org/BlogPosting">
<?php foreach ($this->intro_items as $key => &$item) : ?>
<div class="com-content-category-blog__item blog-item" itemprop="blogPost" itemscope itemtype="https://schema.org/BlogPosting">
<?php
$this->item = & $item;
$this->item = &$item;
echo $this->loadTemplate('item');
?>
</div>
<?php endforeach; ?>
</div>
<?php endforeach; ?>
</div>
<?php endif; ?>

Expand All @@ -122,7 +129,8 @@
<?php if ($this->params->get('show_category_heading_title_text', 1) == 1) : ?>
<h3> <?php echo Text::_('JGLOBAL_SUBCATEGORIES'); ?> </h3>
<?php endif; ?>
<?php echo $this->loadTemplate('children'); ?> </div>
<?php echo $this->loadTemplate('children'); ?>
</div>
<?php endif; ?>
<?php if (($this->params->def('show_pagination', 1) == 1 || ($this->params->get('show_pagination') == 2)) && ($this->pagination->pagesTotal > 1)) : ?>
<div class="com-content-category-blog__navigation w-100">
Expand Down
12 changes: 11 additions & 1 deletion components/com_newsfeeds/tmpl/category/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Layout\FileLayout;
use Joomla\CMS\Layout\LayoutHelper;

$pageClass = $this->params->get('pageclass_sfx');
$htag = $this->params->get('show_page_heading') ? 'h2' : 'h1';
Expand All @@ -34,7 +35,16 @@
<?php if ($this->params->get('show_description', 1) || $this->params->def('show_description_image', 1)) : ?>
<div class="com-newsfeeds-category__description category-desc">
<?php if ($this->params->get('show_description_image') && $this->category->getParams()->get('image')) : ?>
<img src="<?php echo $this->category->getParams()->get('image'); ?>">
<?php echo LayoutHelper::render(
'joomla.html.image',
[
'image' => [
'src' => $this->category->getParams()->get('image'),
'alt' => empty($this->category->getParams()->get('image_alt')) && empty($this->category->getParams()->get('image_alt_empty')) ? '' : $this->category->getParams()->get('image_alt'),
'attributes' => []
],
]
); ?>
<?php endif; ?>
<?php if ($this->params->get('show_description') && $this->category->description) : ?>
<?php echo HTMLHelper::_('content.prepare', $this->category->description, '', 'com_newsfeeds.category'); ?>
Expand Down
59 changes: 41 additions & 18 deletions components/com_newsfeeds/tmpl/newsfeed/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Layout\FileLayout;
use Joomla\CMS\Layout\LayoutHelper;

?>

Expand All @@ -40,9 +41,9 @@
<?php $images = json_decode($this->item->images); ?>
<div class="com-newsfeeds-newsfeed newsfeed<?php echo $direction; ?>">
<?php if ($this->params->get('display_num')) : ?>
<h1 class="<?php echo $direction; ?>">
<?php echo $this->escape($this->params->get('page_heading')); ?>
</h1>
<h1 class="<?php echo $direction; ?>">
<?php echo $this->escape($this->params->get('page_heading')); ?>
</h1>
<?php endif; ?>
<h2 class="<?php echo $direction; ?>">
<?php if ($this->item->published == 0) : ?>
Expand All @@ -61,30 +62,43 @@
<!-- Show Images from Component -->
<?php if (isset($images->image_first) && !empty($images->image_first)) : ?>
<?php $imgfloat = empty($images->float_first) ? $this->params->get('float_first') : $images->float_first; ?>
<?php $alt = empty($images->image_first_alt) && empty($images->image_first_alt_empty)
? ''
: 'alt="' . htmlspecialchars($images->image_first_alt, ENT_COMPAT, 'UTF-8') . '"'; ?>

<div class="com-newsfeeds-newsfeed__first-image img-intro-<?php echo htmlspecialchars($imgfloat, ENT_COMPAT, 'UTF-8'); ?>">
<img
<?php $imgAttribs = []; ?>
<?php if ($images->image_first_caption) : ?>
<?php echo 'class="caption" title="' . htmlspecialchars($images->image_first_caption, ENT_COMPAT, 'UTF-8') . '"'; ?>
<?php $imgAttribs['class'] = 'caption'; ?>
<?php $imgAttribs['title'] = htmlspecialchars($images->image_first_caption, ENT_COMPAT, 'UTF-8'); ?>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, still have question: Why do we use htmlspecialchars here for title instead of handle it in the layout like alt attribute?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although title is an acceptable attribute for images https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#attributes and https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes I have no clue if it's a11y correct. We could loop through all the attributes and escape them but it would be tiny slower and also most of the attributes should be fine without escaping (class, id, etc)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I think we should not loop through all the attributes and escape them. I just think we should move htmlspecialchars for title to the layout (same as alt) to make the code uses layout simpler.

@Fedik Any feedback about this? If all is OK, I will do final test and report test result.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, just make it as you did for alt

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kinda disagree here. The problem is that instead of title the parent layout should used figure and figcaption elements. The title is not a11y correct in this case and the platform already has the solution with the figure element. So, adding title to the img layout will be the wrong solution to the problem…

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

then just remove it here from attributes, no one will cry for it ;)
maybe some old legacy thing

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes that’s a legacy thing

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Fedik @joomdonation so I swapped the title for a figure/figcaption, let me know if there's something more here

<?php endif; ?>
src="<?php echo htmlspecialchars($images->image_first, ENT_COMPAT, 'UTF-8'); ?>" <?php echo $alt; ?>>
<?php echo LayoutHelper::render(
'joomla.html.image',
[
'image' => [
'src' => $images->image_first,
'alt' => empty($images->image_first_alt) && empty($images->image_first_alt_empty) ? '' : $images->image_first_alt,
'attributes' => $imgAttribs
],
]
); ?>
</div>
<?php endif; ?>

<?php if (isset($images->image_second) and !empty($images->image_second)) : ?>
<?php $imgfloat = empty($images->float_second) ? $this->params->get('float_second') : $images->float_second; ?>
<?php $alt = empty($images->image_second_alt) && empty($images->image_second_alt_empty)
? ''
: 'alt="' . htmlspecialchars($images->image_second_alt, ENT_COMPAT, 'UTF-8') . '"'; ?>
<div class="com-newsfeeds-newsfeed__second-image float-<?php echo htmlspecialchars($imgfloat, ENT_COMPAT, 'UTF-8'); ?> item-image">
<img
<?php $imgAttribs = []; ?>
<?php if ($images->image_second_caption) : ?>
<?php echo 'class="caption" title="' . htmlspecialchars($images->image_second_caption) . '"'; ?>
<?php $imgAttribs['class'] = 'caption'; ?>
<?php $imgAttribs['title'] = htmlspecialchars($images->image_second_caption, ENT_COMPAT, 'UTF-8'); ?>
<?php endif; ?>
src="<?php echo htmlspecialchars($images->image_second, ENT_COMPAT, 'UTF-8'); ?>" <?php echo $alt; ?>>
<?php echo LayoutHelper::render(
'joomla.html.image',
[
'image' => [
'src' => $images->image_second,
'alt' => empty($images->image_second_alt) && empty($images->image_second_alt_empty) ? '' : $images->image_second_alt,
'attributes' => $imgAttribs
],
]
); ?>
</div>
<?php endif; ?>
<!-- Show Description from Component -->
Expand All @@ -98,9 +112,18 @@
<?php endif; ?>

<!-- Show Image -->
<?php if ($this->rssDoc->image && $this->params->get('show_feed_image')) : ?>
<?php if ($this->rssDoc->image && $this->params->get('show_feed_image')) : ?>
<div class="com-newsfeeds-newsfeed__feed-image">
<img src="<?php echo $this->rssDoc->image->uri; ?>" alt="<?php echo $this->rssDoc->image->title; ?>" />
<?php echo LayoutHelper::render(
'joomla.html.image',
[
'image' => [
'src' => $this->rssDoc->image->uri,
'alt' => $this->rssDoc->image->title,
'attributes' => []
],
]
); ?>
</div>
<?php endif; ?>

Expand Down
25 changes: 25 additions & 0 deletions layouts/joomla/html/image.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php
/**
* @package Joomla.Site
* @subpackage Layout
*
* @copyright (C) 2021 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\HTML\HTMLHelper;

extract($displayData);

$imgAttribs = $image['attributes'];
$img = HTMLHelper::_('cleanImageURL', $image['src']);

if ($img->width > 0 && $img->height > 0) {
$imgAttribs['width'] = $img->width;
$imgAttribs['height'] = $img->height;
$imgAttribs['loading'] = 'lazy';
}

echo HTMLHelper::_('image', htmlspecialchars($img->url, ENT_QUOTES, 'UTF-8'), htmlspecialchars($image['alt'], ENT_QUOTES, 'UTF-8'), $image['attributes']);
24 changes: 17 additions & 7 deletions modules/mod_articles_news/tmpl/_item.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,35 @@

defined('_JEXEC') or die;

use Joomla\CMS\HTML\HTMLHelper;
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 if ($item->link !== '' && $params->get('link_titles')) : ?>
<a href="<?php echo $item->link; ?>">
<?php echo $item->title; ?>
</a>
<?php else : ?>
<?php echo $item->title; ?>
</a>
<?php else : ?>
<?php echo $item->title; ?>
<?php endif; ?>
<?php endif; ?>
</<?php echo $item_heading; ?>>
<?php endif; ?>

<?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 echo LayoutHelper::render(
'joomla.html.image',
[
'image' => [
'src' => $item->imageSrc,
'alt' => $item->imageAlt,
'attributes' => []
],
]
); ?>
<?php if (!empty($item->imageCaption)) : ?>
<figcaption>
<?php echo $item->imageCaption; ?>
Expand Down