We should change the "Restrict parent items to" in menu settings to allow multiple selection. Let's say you have a header menu and a footer menu to which you want to allow a client to add menu items. Right now you can only select one and "all or one" is a bit limiting.

Will try to get a patch up shortly for this.

CommentFileSizeAuthor
#12 menu.zip12.26 KBlinulo

Comments

harking’s picture

Version: x.y.z » 5.x-dev

I agree that this would be very useful.

RobRoy’s picture

Version: 5.x-dev » 6.x-dev

Moving to 6.x for code freeze.

mpare’s picture

I would like to second this. I saw a notice about moving it to 6.x. Why? I agree this should be an option in 6 but the problem still needs to be addressed. I am not advanced in drupal but if someone can help point me in the right direction I wouldn't mind this being my first patch. :) Mind you I've never made a patch and I may not be the best person for this but I would love to do this for everyone else. I know this is going offer is probably going to sound stupid considering I don't really know what it will take or if I am even capable of success. I think I need to start in menu.module but if someone would like to provide me with some things to consider I will continue to work on this.

Thanks,
-mpare

Anonymous’s picture

+1 on this idea as well.

budda’s picture

Just what the doctor ordered +1

So who's going to take a stab at implementing it? :-)

jg-1’s picture

See: http://drupal.org/project/menu_stp

It provides the functionality you are looking for in a round-about way.

robeano’s picture

+1

mrichar1’s picture

There is actually a more serious bug that this enhancement would fix. On my drupal 5.1 sites if I "restrict parent items" to Primary Links, whenever I go and edit a node that is not in primary links it forces my node into the Primary Links menu tree. Even if I don't touch the menu section at all when I am editing the node "Primary Links" gets set as the parent item which means one of my footer links automatically gets moved to the Primary Navigation!

Making this enhancement in version 5 would automatically fix this bug. If then enhancement can't be backported, please consider fixing the existing bug anyway.

rickvug’s picture

Title: Allow multiple selection in "Restrict parent items to" in menu settings » Add "Restrict parent items to" option back onto the menu settings page
Category: feature » task
Priority: Minor » Normal

I'm re-naming this issue as there doesn't seem to be any "restrict parent items to" option in Drupal 6 dev at all at the moment (unless the option has been moved somewhere other than admin/build/menu/settings).

While I agree that it would be excellent to expand this feature to multiple menus I think the focus should be on not loosing this functionality in Drupal 6 as this little feature is a great for usability.

PS - Please do revert to the original issue title and priority if there is already ticket to correct the functionality regression.

mtndan’s picture

Would love to support a patch for 5.x to achieve this functionality. Thanks!

linulo’s picture

Not only did this feature not go into Drupal 6 but instead it has been removed, leaving the admins without control over where users link their nodes into the menu. The new option "Default for menu content" does not hide menus content should not be attached to (like the administrator backend). It would be very desirable to re-implement at least the functionality that we used to have in Drupal 5.x.

linulo’s picture

StatusFileSize
new12.26 KB

I have made a patch that has the desired functionality. I am going to submit it once I have figured out how to diff correctly on my windows box. For the curious I have attached the files. They are for Drupal 6.0, but this is not meant to be a proper patch submission. I will do that in the next days.

webchick’s picture

Linulo: We have a section in the handbook on how to create patches on Windows, which might be worth a glance-over: http://drupal.org/node/60234. Generally, I think Windows users use TortoiseCVS to make patches, although if you get a full Cygwin environment setup you can also apply other peoples' patches to review them, and quickly become a Drupal hero. :D

If you have trouble, stop by #drupal on irc.freenode.net and ask for some help. There's usually someone in there who can offer some advice.

linulo’s picture

Thank you for the pointers, webchick. I have already read much of what there is to read, listenend to your Podcast about cygwin the day it came out and read on #drupal that you use the word "blogsphere" :-). The only thing keeping me from starting a carreer as a drupal hero is a very tight schedule.

Anonymous’s picture

Also there is MSYS over at mingw.org. It is a fork of Cygwin created merely for a minimal environment and along with the msysDTK provides cvs/ssh/ssl ability.

tobiasb’s picture

Thank you. The patch works. So must it be!

goosemoose’s picture

Any more on this for 5.x? I'd love to be able to select to menus for my users to add items to.

kernighan’s picture

I'm also interested by this option for Drupal 5.x . Does someone work on it anymore ?

brei9000’s picture

Patch works, thank you so much Linulo!

brei9000’s picture

Question... has anyone else used this patch and had issues? I am unable to edit my menu settings. Sometimes I can, sometimes I can't. I'm thinking about removing the patch unless someone has a solution.

dmsmidt’s picture

It would be nice to have this function implemented in the menu system. As described in another post of mine, this would fit my needs.. (http://drupal.org/node/328272) Linulo seems to be right, nothing left in drupal 6 of this functionality. What a pity

code-brighton’s picture

There is a great module, that solve all these issues called Menu Settings per Content Type - it does exactly what it says on the tin, very useful

http://drupal.org/project/ctm

dmsmidt’s picture

No it doesn't solve these issues as far I can see from the module page. It will not restrict a menu item to a predefined parent menu item or menu, but will only hide the menu edit option on some content-types. The following module will solve these issues but is still in development: http://drupal.org/project/menu_stp

bartezz’s picture

Proper patch or not Linulo, your solution worked for me! So I ain't complaining.
Thanx mate...

retuam’s picture

I can not use Linulo's solution for drupal 6.13.

rickvug’s picture

Status: Active » Closed (won't fix)

For Drupal 7, this was fixed at #351249: Finer control over the Parent Menu select box. I'm marking as won't fix as I don't see the functionality being backported. Would be best to use one of the contrib modules recommended.