Closed (won't fix)
Project:
Special menu items
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
10 Jul 2009 at 15:25 UTC
Updated:
19 Jun 2012 at 16:27 UTC
Jump to comment: Most recent file
Comments
Comment #1
marcvangendOops, I left a php syntax error in my patch. Use this one.
Comment #2
tamerzg commentedHi marcvangend ,
thank you for submitting the patch. We will review it and add it to next revision.
Comment #3
marcvangendI have found that my patch doesn't work correctly on a site with language prefixes.
Also, I noticed a new module (Menu Firstchild, http://drupal.org/project/menu_firstchild, first added less that 2 hours before I posted the patch above) which does the same thing, but in another way. I am not the only one who has noticed the kinship between Special Menu Items and Menu Firstchild; see http://drupal.org/node/515960. Maybe it should be considered if both modules can join forces?
Comment #4
tamerzg commentedHi,
I have tested your module. It is really nice feature to have. However I noticed a bug. If firstchild is submenu, then it will still point to firstchild dummy page. I traced the code and it seems that it will never enter if statement:
if ($branch['link']['mlid'] == $link['mlid']) {
$firstchild = array_shift($branch['below']);
break;
}
Also I tried it with Jquery menu and in there didn't work at all. Hope we can fix this, and we will add it in new release.
And yes, I have seen Menu Firstchild module. If author is interested in joining forces, I will be glad to accept him and give him CVS access.
Comment #5
tamerzg commentedOh yes, sometimes I got this error when saving firstchild item:
warning: array_shift() [function.array-shift]: The argument should be an array in C:\wamp\www\drupal611\sites\all\modules\special_menu_items\special_menu_items.module on line 114.
Comment #6
flaviovs commentedFYI: the Menu First Child module does exactly this.
Comment #7
gagarine commentedI will commit this for D7 if someone provide a patch. Please take a look at the implementation of Menu First Child (because it works and was tested a lot).
Comment #8
gagarine commentedAs say in 6 their is another module for that..