Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Since OG User Roles 5.x-2.7 (also in 5.x-2.8) in the 'Group details' menu of a user I do not have the content types only as menu items on the top menu level: I have in addition a menu item "create content" under which the menu links for the content types appear for a second time. I cannot find out how I can change it in a way, that a content type only appears once in the group menu. I hope someone can help me.
Comment | File | Size | Author |
---|---|---|---|
#4 | og_user_roles.module.5.x-3.2.patch | 10.88 KB | SomebodySysop |
Comments
Comment #1
Sebo CreditAttribution: Sebo commentedIf you want to customize the 'Group details' block, here are some hints (copy/pasted) from the OG readme.txt:
To remove the 'create content' item from this block, here is the function I wrote according to the preceeding guideline:
To get the name of the item to remove, you can just add a print_r($links) to this function: it will show you all the items ready to be themed. You can remove them using the same kind of 'unset' instruction (this is how I figured out that the 'Create content' item has the key '0').
I hope it helps.
Comment #2
mikox CreditAttribution: mikox commentedThank you, with your help I could change the `Group details' menu the way I wanted.
But it still seems strange to me that with the standard installation of OG User Roles (since 5.x-2.7) the content types are shown twice in this menu (as described before); I believe this is only in the interest of a small minority of users.
Comment #3
kimadactyl CreditAttribution: kimadactyl commentedThis function does it the other way round and gets rid of everything *but* the create content link.
Comment #4
SomebodySysop CreditAttribution: SomebodySysop commentedThanks dar-es-balat. I decided to incorporate your code as an option.
Try this patch against a clean download of the 3.1 release.
On the 'Edit' form of the group, you will find an option to display 'Create content' and remove the default OG 'Create ..."
Hopefully this will satisfy everyone.
Comment #5
SomebodySysop CreditAttribution: SomebodySysop commentedComment #6
SomebodySysop CreditAttribution: SomebodySysop commentedThe modifications will be included in the 3.2 release.
Comment #7
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.