adding rel="nofollow" to joomla menu item
Moderator: General Support Moderators
Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
-
- Joomla! Intern
- Posts: 64
- Joined: Sun Aug 28, 2011 9:20 pm
adding rel="nofollow" to joomla menu item
Hi,
I want to add the nofollow attribute to some of the links on my menu items. When i use the default robot option on Joomla menu, it will add the attribute to the meta data of the page but not the link itself. Is it possible to modify the links on menu items and add the rel="nofollow"
I'm using Joomla 2.5
Thanks,
I want to add the nofollow attribute to some of the links on my menu items. When i use the default robot option on Joomla menu, it will add the attribute to the meta data of the page but not the link itself. Is it possible to modify the links on menu items and add the rel="nofollow"
I'm using Joomla 2.5
Thanks,
- Per Yngve Berg
- Joomla! Master
- Posts: 30879
- Joined: Mon Oct 27, 2008 9:27 pm
- Location: Romerike, Norway
Re: adding rel="nofollow" to joomla menu item
Put the links in the robots.txt file.
-
- Joomla! Intern
- Posts: 64
- Joined: Sun Aug 28, 2011 9:20 pm
Re: adding rel="nofollow" to joomla menu item
That would completely block the search engine bots and it will hurt optimization. I just want to add the attribute to the link in some pages that i have to balance the number of links that link juice passes through on that page.Per Yngve Berg wrote:Put the links in the robots.txt file.
- Per Yngve Berg
- Joomla! Master
- Posts: 30879
- Joined: Mon Oct 27, 2008 9:27 pm
- Location: Romerike, Norway
-
- Joomla! Intern
- Posts: 64
- Joined: Sun Aug 28, 2011 9:20 pm
Re: adding rel="nofollow" to joomla menu item
Well this is what i did. It's cheating but it worked. It would be be great if this option can be available on core joomla options. is there any place we can request adding feature?Per Yngve Berg wrote:http://docs.joomla.org/How_to_override_ ... omla!_core
Here's what it did:
Go modules/mod_menu/tmpl
edit the file default_url.php
Code: Select all
$class = $item->anchor_css ? 'class="'.$item->anchor_css.'" ' : '';
$title = $item->anchor_title ? 'title="'.$item->anchor_title.'" ' : '';
"Link CSS Style" and "Link Image". i don't use any of them so just edited the 'class="' to 'rel="'
so the code looks like this
Code: Select all
$class = $item->anchor_css ? 'rel="'.$item->anchor_css.'" ' : '';
$title = $item->anchor_title ? 'title="'.$item->anchor_title.'" ' : '';
-
- Joomla! Fledgling
- Posts: 1
- Joined: Tue Apr 16, 2013 2:34 pm
Re: adding rel="nofollow" to joomla menu item
Thanks, gsadeghi. I used your hack but the file I had to change was default_component.php.
-
- Joomla! Fledgling
- Posts: 1
- Joined: Wed Mar 20, 2013 11:31 am
Re: adding rel="nofollow" to joomla menu item
Awesome dude it works for me as well.
-
- Joomla! Fledgling
- Posts: 1
- Joined: Tue Jun 11, 2013 10:11 pm
- Location: Auckland, NZ
- Contact:
Re: adding rel="nofollow" to joomla menu item
Google has recently done a big update and started penalising nofollows if you use them too much. What I mean is site sculpting based on keywords, e.g. content siloing using categories etc.
- pishro
- Joomla! Explorer
- Posts: 301
- Joined: Tue Oct 09, 2012 7:22 am
Re: adding rel="nofollow" to joomla menu item
I agree with MediaCore!MediaCore wrote:Google has recently done a big update and started penalising nofollows if you use them too much. What I mean is site sculpting based on keywords, e.g. content siloing using categories etc.
please see this item Metadata Options > Robotsgsadeghi wrote:I want to add the nofollow attribute to some of the links on my menu items.
http://docs.joomla.org/Help25:Menus_Men ... ta_Options
-
- Joomla! Fledgling
- Posts: 1
- Joined: Sun Sep 14, 2014 5:57 pm
Re: adding rel="nofollow" to joomla menu item
One workaround is to use "Link Title attribute" in Link Type Options, just put:
" rel="nofollow" "
this "html-injection" allow you to add any other tag to the link without hacking any program. It works to me with v2.5.11
" rel="nofollow" "
this "html-injection" allow you to add any other tag to the link without hacking any program. It works to me with v2.5.11
- ladydevil
- Joomla! Intern
- Posts: 52
- Joined: Sun Sep 14, 2014 5:56 am
- Location: Singapore
- Contact:
Re: adding rel="nofollow" to joomla menu item
I think just putting tags: rel = "nofollow".
but I do not see people doing that.?
but I do not see people doing that.?
-
- Joomla! Enthusiast
- Posts: 221
- Joined: Fri Oct 10, 2008 9:03 pm
- Contact:
Re: adding rel="nofollow" to joomla menu item
This is an awesome solution. I have used it to make Bootstrap modals launch from a Joomla menu item.egonzalez wrote:One workaround is to use "Link Title attribute" in Link Type Options, just put:
" rel="nofollow" "
this "html-injection" allow you to add any other tag to the link without hacking any program. It works to me with v2.5.11
Thanks
-
- Joomla! Enthusiast
- Posts: 221
- Joined: Fri Oct 10, 2008 9:03 pm
- Contact:
Re: adding rel="nofollow" to joomla menu item
Can you post an example of your code so i can add it to my notesegonzalez wrote:
This is an awesome solution. I have used it to make Bootstrap modals launch from a Joomla menu item.
Thanks
https://quantumwarp.com/kb/articles/30- ... extensions
I am glad it helped
- Per Yngve Berg
- Joomla! Master
- Posts: 30879
- Joined: Mon Oct 27, 2008 9:27 pm
- Location: Romerike, Norway
Re: adding rel="nofollow" to joomla menu item
Not very useful. Bootstrap is not included in joomla 2.5. Check what forum you are posting in.
-
- Joomla! Enthusiast
- Posts: 221
- Joined: Fri Oct 10, 2008 9:03 pm
- Contact:
Re: adding rel="nofollow" to joomla menu item
I did.Per Yngve Berg wrote:Not very useful. Bootstrap is not included in joomla 2.5. Check what forum you are posting in.
You should read the post again. egonzalez said he used it for creating bootstrap modals from the joomla menu and I asked him for his code which is related to the thread as a whole and to his post because he used a technique I posted.
And why is it not useful, I think it is, also the related link I gave egonzalez he might find very useful.
Thanks