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.
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:
- using HTML img tag
- or using J! code.
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.
Those icons are also from the template folder, so you can upload/replace with your own PNG icons (16 x 16 pixels).
- templates/gk_TemplateName/images/system/printButton.png
- templates/gk_TemplateName/images/system/emailButton.png