How to change appearance of "action items", the button which reveals email and print actions on an article

by Tim Richardson   Last Updated April 13, 2019 13:10 PM - source

I want to show a simple "email to friend" button on my Joomla articles (3.9.5) The Articles global options allows Email and Print actions to be added, but they are then "hidden" behind a blue cog icon. I just want to show the icons directly because hiding this behind a cog wheel is too hard for the users I have in mind. The convention is to show an email icon (not hidden behind another click).

I want to avoid an extension which does social media sharing because it is over the top, I just want an email article link, and Joomla's standard feature looks fine (apart from the way it is presented).

I can't find which php file I should override. I have not over-ridden Joomla php before, but from documentation I've read, it doesn't look too hard.

I guess what I am looking for is in

/var/www/html/components/com_content

but I am not making any progress.

Can anyone point me in the direction of which file I should override. Recursive grep is not being very helpful to me (because I don't know what to look for).

Tags : articles


Answers 1


The default Joomla code doing the call to display the icons can be found in .../components/com_content/views/article/tmpl/default.php starting at line 68.

At Line 70 this calls a layout routine to process which options are set(edit,print,email) and write the html to display the icons.

You can find the the layout code in.../layouts/joomla/com_content/icons/*.php

You can create overrides for both of the files mentioned using the standard feature under the Templates menu.

Beware though when you elect to override the layouts/joomla/com_content it will copy All of the layouts so you will need to delete all the ones you don't want to change or you could run into issues later on when core updates aren't being reflected on your site.

Irata
Irata
April 13, 2019 12:41 PM

Related Questions



Cannot find featured articles on Joomla Backend

Updated February 22, 2017 02:10 AM



Order Broken on Feature Article page

Updated March 15, 2017 14:10 PM