Warning: for Joomla 3 not for Joomla 4
The standard output from any Joomla! Module or Component can be overridden by adding code to the html directory of your template
There is a lot of article about Joomla! override. I will cite erticle from CINNK "Small guide to start with Joomla override!" (See links - in french of course).
I try to use the least possible override in my sites due to the updates where they are not taken into account. On the other hand I very often use the "info block" override for Joomla! Articles.
For the hydrogen template, the default info blocks look like this
What I want is
To do this, you must override the "info block" files found in layouts/joomla/content/info_block
Job to do
1) Create a copy of these files on your hard drive
2) Make the desired changes
3) Place these modified files in /templates/g5_hydrogen/html/layouts/joomla/content/info_block
Type of modification - Example on author.php :
basis file :
<dd class="createdby" itemprop="author" itemscope itemtype="https://schema.org/Person"> <?php $author = ($displayData['item']->created_by_alias ?: $displayData['item']->author); ?> <?php $author = '<span itemprop="name">' . $author . '</span>'; ?> <?php if (!empty($displayData['item']->contact_link ) && $displayData['params']->get('link_author') == true) : ?> <?php echo JText::sprintf('COM_CONTENT_WRITTEN_BY', JHtml::_('link', $displayData['item']->contact_link, $author, array('itemprop' => 'url'))); ?> <?php else : ?> <?php echo JText::sprintf('COM_CONTENT_WRITTEN_BY', $author); ?> <?php endif; ?> </dd>
Modifications :
<dd class="createdby hasTooltip" itemprop="author" itemscope itemtype="http://schema.org/Person" title="<?php echo JText::sprintf('COM_CONTENT_WRITTEN_BY', ''); ?>"> <i class="fa fa-user"></i> <?php if (!empty($displayData['item']->contact_link ) && $displayData['params']->get('link_author') == true) : ?> <?php echo JHtml::_('link', $displayData['item']->contact_link, $author, array('itemprop' => 'url')); ?> <?php else :?> <?php echo $author; ?> <?php endif; ?> </dd>