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.
While working on a small module to enable toolbar configuration per role I noticed that its not possible to define tabs for sub-pages of profile/%wysiwyg_profile/edit at the moment (i.e. as on admin/structure/types/manage/%node_type/display).
If we do a tiny rewrite of wysiwyg_menu()
this will be possible (without breaking something; or at least I couldn't find something ;) ).
Patch follows ...
Comment | File | Size | Author |
---|---|---|---|
#3 | wysiwyg-2043081-3.patch | 2.03 KB | TwoD |
#1 | rewrite-hook_menu-2043081-1.patch | 2.39 KB | stBorchert |
Comments
Comment #1
stBorchertAnd here is the patch ...
Comment #2
stBorchertScreenshot of additional tabs that won't be possible without this patch:
Comment #3
TwoDI'd like to keep this linked to /edit to follow the pattern set by other modules. We don't currently have a way to just "view" a profile without editing it, but maybe that will be useful in the future and I'd like to reserve the non-edit path for that.
We need a title callback here. It would make it a lot easier to implement Admin menu's
hook_admin_menu_map()
later if we simply return the name of the format a profile is attached to here, since that's the primary way to identify a profile.No need to move this.
Took the liberty of modifying your patch. What do you think?
Comment #4
stBorchertLooks great.
I don't care much about how it is done if the result is the same :D
Comment #5
TwoDCommitted to 7.x-2.x and 6.x-2.x. with appropriate path changes. Expanded the comment to the title callback to clarify the parameter and return value.
This change will be in the -dev snapshots within 12 hours and it will be part of the next official releases.
Added bonus for D7: Implementation of hook_admin_menu_map().
Thanks for suggesting, patching and testing this!