SEO optimization rel=”nofollow” for mailto component

926 views
Skip to first unread message

Dave

unread,
Apr 8, 2013, 3:46:55 PM4/8/13
to gantry-framework...@googlegroups.com
Hi,
I'm running the version 4.1.9 of the gantry framework and the default template. So in order to improve my site SEO and avoid duplicated content indexed by search engine like google, I would like to add the rel=”nofollow” tag for mailto component link inside an article.

So the original view page source code section :

<li class="email-icon">
   <a href="/component/mailto/?tmpl=component&amp;template=gantry&amp;link=9fe8df0cfac22750a6f21ca16dc66cfcb2bca504" title="Email" onclick="window.open(this.href,'win2','width=400,height=350,menubar=yes,resizable=yes'); return false;"><img src="/media/system/images/emailButton.png" alt="Email"  /></a> </li>

should look like this:

<li class="email-icon">
   <a rel=”nofollow” href="/component/mailto/?tmpl=component&amp;template=gantry&amp;link=9fe8df0cfac22750a6f21ca16dc66cfcb2bca504" title="Email" onclick="window.open(this.href,'win2','width=400,height=350,menubar=yes,resizable=yes'); return false;"><img src="/media/system/images/emailButton.png" alt="Email"  /></a> </li>

Any help would be appreciated in order to make such change.
Thanks
Dave


Luke Douglas

unread,
Apr 8, 2013, 10:07:11 PM4/8/13
to gantry-framework...@googlegroups.com
Dave,

If you are using the default Joomla contact form, click on each contact, click on Metadata Options and set the robots to No Index, No Follow.  That should do it.

Luke

Dave

unread,
Apr 9, 2013, 12:51:52 AM4/9/13
to gantry-framework...@googlegroups.com
Thanks Luke for the answer. But it's not exactly what I was looking for. I do want robots to index my content and follow links shown inside my articles. But I simply don't want that robots follow the generic mailto icon link such as the print icon link.

But I found a work around in order to solve my problem by editing the following file in Joomla (version 2.5.9):

/components/com_content/helpers/icon.php

and add the following code at line #59:

$attribs['rel'] = 'nofollow';


Is there a better way to do it?

Thanks
Dave

Luke Douglas

unread,
Apr 9, 2013, 2:04:14 AM4/9/13
to gantry-framework...@googlegroups.com
Dave,

You might want to create your own icon.php file in the Gantry 'html' instead of altering part of Joomla.  The reason is that an upgrade could undo your changes whereas if you have custom html code in the 'html' folder, that will never be overwritten, even by Gantry updates.

Luke

Marian

unread,
Apr 11, 2013, 4:05:39 AM4/11/13
to gantry-framework...@googlegroups.com
hi Luke,
I copied the icon.php on templatename/html/com_content/helpers and added that line but didn't work
the path for override is not correct ?
thanks!


2013/4/9 Luke Douglas <lu...@webbering.com>
--
--
You received this message because you are subscribed to the Google
Groups "Gantry Framework for Joomla Users" group.
To post to this group, send email to
gantry-framework...@googlegroups.com
To unsubscribe from this group, send email to
gantry-framework-for-j...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/gantry-framework-for-joomla-users?hl=en
 
Gantry Framework Homepage: http://www.gantry-framework.org
 
---
You received this message because you are subscribed to the Google Groups "Gantry Framework for Joomla Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gantry-framework-for-j...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Luke Douglas

unread,
Apr 11, 2013, 9:42:50 AM4/11/13
to gantry-framework...@googlegroups.com
Theoretically it should work, maybe someone else has an idea. I draw a blank.
Reply all
Reply to author
Forward
0 new messages