Select your language

News !
Informations, tutorials
Dedicated mainly about Joomla! But more if affinity
I have started English version of the blog august 2017, most of previous articles are in french, sorry
Tuto Joomla

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

info block hydrogen

What I want is

info block hydrogen surcharge

 

To do this, you must override the "info block" files found in layouts/joomla/content/info_block

info block files

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>
Become a privileged customer!

Contact

En Toutes Lettres is a french company but have no border. We are always present for additional information :

logo gris
  (33) 6 29 16 98 38
En toutes lettres
4 rue Antoine Bréguet
91750 CHAMPCUEIL
France
 

Last comments