Mike
unread,Jul 16, 2022, 5:26:32 PM7/16/22Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Joomla! General Development
I need to make some adjustments to
/layouts/joomla/content/full_image.php
in Joomla 4.1.5.
For all (full) article images without an alt attribute the alt attribute should be the title of the article.
That works fine with adding the line
$item = $displayData;
and replacing
'alt' => empty($images->image_fulltext_alt) && empty($images->image_fulltext_alt_empty) ? false : $images->image_fulltext_alt,
with
'alt' => $item->title,
Anyway, my challenge now is to only set the article title as an alt attribute in case I did not define an alt attribute in the article settings. I tried but I failed so far. But this should be an easy one, right?