Problem/Motivation
I would like to have an option in the Plugin configuration to automatically create a menu for new created groups.
Proposed resolution
Add the option and the needed code to make it work.
User interface changes
A new checkbox will appear on plugin configuration.
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | 3021591-12.patch | 5.51 KB | seanb |
| #12 | interdiff-11-12.txt | 7.55 KB | seanb |
| #11 | interdiff_7-11.txt | 1.78 KB | jidrone |
| #11 | groupmenu-option-to-autocreate-menu-3021591-11.patch | 4.85 KB | jidrone |
| #9 | https-::www.drupal.org:files:issues:2019-01-07:groupmenu-option-to-autocreate-menu-3021591-9.patch | 4.37 KB | scotwith1t |
Comments
Comment #2
jidrone commentedHere is the patch.
Comment #3
scotwith1tWhile you're at it, @jidrone, i have another request :) another (sub)option for when a group is created and groupmenu is automatically created, the Group is (can be) automatically added as a "Home" link (default to "Home", customizable text for this?) on the group menu just created. Thanks for all the great improvements!
Comment #4
jidrone commentedHi Scot,
I added those new options.
Comment #5
anairamzapHey! Just a quick note to say this is working as expected:
Once the patch in #4 is applied you should install the Group menu plugin in the Group Type, and then in the "Configure" screen you will get at checkbox to enable the two options:
Screenshot added:

Once those two are checked, if you create a new Group you will correctly get a new Menu with a "home" link pointing to the Group landing page.
I would mark this one as Reviewed and Tested, but will let someone else to try it in case I have missed something :)
Comment #6
scotwith1tYes! +1 for this super-handy feature! Works as advertised/requested. :)
Comment #7
jidrone commentedFixed an error when you create groups with long name, reported by Scot:
Comment #8
scotwith1tSuppose we should run this by the bot.
Comment #9
scotwith1tPerhaps I have to re-upload and have Needs Review status at the same time?
Comment #10
scotwith1tOh. There are no tests in this module. Nevermind.
Comment #11
jidrone commentedHere is a fix for menu's id and also deleting only auto-created menu when group is deleted.
Comment #12
seanbMade some changes to the patch. Before I commit it, it would be nice if someone could double check everything works as expected and RTBC.
Comment #13
jidrone commentedI tested it and it's working fine.
Comment #15
seanbFixed! Thanks everyone.