Hi,
I am looking at themeing / silo design and would like to add the rel="nofollow" link relationship attribute to certain menu items.
This can be done with a hack to Joomla component.xml as detailed here http://joomlacode.org/gf/project/joomla ... m_id=10218 which may become core, however I am using the extended menu module.
This module is new to me so I am not sure where I should be looking to add this attrbitue so could somebody point me in the right direction or advise what hack would be necessary in extended menus to achieve this.
Thanks,
Nic
nofollow with extended menu
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! Apprentice
- Posts: 43
- Joined: Thu Dec 08, 2005 12:29 am
nofollow with extended menu
Signature rules: Literal URLs only - http://forum.joomla.org/viewtopic.php?f=8&t=65
-
- Joomla! Apprentice
- Posts: 43
- Joined: Thu Dec 08, 2005 12:29 am
Re: nofollow with extended menu
Aha! just need to modify the Extended Menu menuview.class.php
If you want to force all menu links by default to nofollow then just add;
before
and add to the link build for each case
Otherwise you need to use the hack I posted a link too in the previous post and pass over the status of the nofollow parameter to extended menu.
Can anybody give any pointers on getting the $params->def for each item of the joomla menu passed over into extended menu ?
If you want to force all menu links by default to nofollow then just add;
Code: Select all
$nofollow = ' rel="nofollow" ';
Code: Select all
switch ($mitem->browserNav) {
Code: Select all
$nofollow
Otherwise you need to use the hack I posted a link too in the previous post and pass over the status of the nofollow parameter to extended menu.
Can anybody give any pointers on getting the $params->def for each item of the joomla menu passed over into extended menu ?
Signature rules: Literal URLs only - http://forum.joomla.org/viewtopic.php?f=8&t=65
-
- Joomla! Apprentice
- Posts: 43
- Joined: Thu Dec 08, 2005 12:29 am
Re: nofollow with extended menu
looks like a problem firstly with the menu hack in the link above
the nofollow paramter is not being passed to helper.php for the standard menu so something is wrong, can somebody see whats up (parameter is defined in component.xml for the mainmenu and is set accordingly for the item(s))?
$iNofollow = $iParams->def('nofollow', 0);
if( $iNofollow == 1 )
$nofollow = ' rel="nofollow" ';
else
$nofollow = '';
the nofollow paramter is not being passed to helper.php for the standard menu so something is wrong, can somebody see whats up (parameter is defined in component.xml for the mainmenu and is set accordingly for the item(s))?
$iNofollow = $iParams->def('nofollow', 0);
if( $iNofollow == 1 )
$nofollow = ' rel="nofollow" ';
else
$nofollow = '';
Signature rules: Literal URLs only - http://forum.joomla.org/viewtopic.php?f=8&t=65
-
- Joomla! Apprentice
- Posts: 43
- Joined: Thu Dec 08, 2005 12:29 am
Re: nofollow with ANY menu
I found this thread;
http://forum.joomla.org/viewtopic.php?f ... 37&start=0
whch uses a slightly different approach, however they both modfy the helper.php file, even when I modify the helper.php and hand code rel="nofollow" to any of the cases I still dont get a nofollow link, so I am confused as to what is actually building the menu links ?
I am using the mod_mainmenu on J1.5.10.
Also tried moding the legacy.php with no result
No matter what menu style I choose I dont get a nofollow - confusing ?
Can anybody help ?
http://forum.joomla.org/viewtopic.php?f ... 37&start=0
whch uses a slightly different approach, however they both modfy the helper.php file, even when I modify the helper.php and hand code rel="nofollow" to any of the cases I still dont get a nofollow link, so I am confused as to what is actually building the menu links ?
I am using the mod_mainmenu on J1.5.10.
Also tried moding the legacy.php with no result
No matter what menu style I choose I dont get a nofollow - confusing ?
Can anybody help ?
Signature rules: Literal URLs only - http://forum.joomla.org/viewtopic.php?f=8&t=65
-
- Joomla! Apprentice
- Posts: 43
- Joined: Thu Dec 08, 2005 12:29 am
attributes being stripped ?
OK, if I manually add the rel="nofollow" and use the code above to pass the parameter from the item settings I get an XHTML parsing error saying that there are duplicate link attributes.....sounds good as it confirms that the attributes are obviously getting passed and are they appear in the link at some point...
However, when page finishes building all attributes are stripped from the link somewhere ?
However, when page finishes building all attributes are stripped from the link somewhere ?
Signature rules: Literal URLs only - http://forum.joomla.org/viewtopic.php?f=8&t=65
-
- Joomla! Apprentice
- Posts: 43
- Joined: Thu Dec 08, 2005 12:29 am
Re: nofollow with ANY menu XHTML
The thread below details the XHTML method for building the menu list....need to do some digging around there I think
http://forum.joomla.org/viewtopic.php?f=469&t=239751
Looks like JSimpleXMLElement could be the beast responsible...
http://forum.joomla.org/viewtopic.php?f=469&t=239751
Looks like JSimpleXMLElement could be the beast responsible...
Signature rules: Literal URLs only - http://forum.joomla.org/viewtopic.php?f=8&t=65
-
- Joomla! Apprentice
- Posts: 6
- Joined: Sun Nov 28, 2010 9:12 am
- Location: Thailand
- Contact:
Re: nofollow with ANY menu
I did this step too but still dont get a nofollow link.Nic W wrote:I found this thread;
http://forum.joomla.org/viewtopic.php?f ... 37&start=0
whch uses a slightly different approach, however they both modfy the helper.php file, even when I modify the helper.php and hand code rel="nofollow" to any of the cases I still dont get a nofollow link, so I am confused as to what is actually building the menu links ?
I am using the mod_mainmenu on J1.5.10.
Also tried moding the legacy.php with no result
No matter what menu style I choose I dont get a nofollow - confusing ?
Can anybody help ?
What I should do?
กระเป๋าแฟชั่น
http://www.lady-choice.com
http://www.lady-choice.com