GavickPro Documentation

Use print & email icons to make your Joomla site more understandable

We all know that sometimes your clients expect typical icons instead of “modern” text links for print and email icons in article views like it was in the default joomla templates – that’s why we’ve prepared this short but useful guide.

Before customization

First of all, you have to modify our override file in the GK template:

 templates\gk_TemplateName\html\com_content\article\default.php

You can use one of the following techniques for replacing our code to use custom icons:

Both are simple, and the second one just needs a simple copy & paste from the following code.

For a PRINT icon, please find in the source code file:

<?php echo preg_replace('@<img.*?alt="(.*?)".*?\/>@mis', '$1',JHtml::_('icon.print_popup',  $this->item, $params)); ?>,

and replace it with:

<?php echo JHtml::_('icon.print_popup',  $this->item, $params); ?>

For an E-MAIL icon, please find:

<?php echo preg_replace('@<img.*?alt="(.*?)".*?\/>@mis', '$1',JHtml::_('icon.email',  $this->item, $params)); ?>

and replace it with

<?php echo JHtml::_('icon.email',  $this->item, $params); ?>

Now upload the changed file to your template folder on your server.

Default icons for print & email – after customization

Those icons are also from the template folder, so you can upload/replace with your own PNG icons (16 x 16 pixels).

Use print & email icons to make your Joomla site more understandable 2.835 (56.67%) 6 votes