Problem/Motivation
It is unclear from the standard blocks administration page how to delete a menu block. It is also not clearly shown on the blocks administration page that menu blocks are created and to a large extent managed by the menu system.
Proposed resolution
Nothing concrete yet. Current suggestions:
1. Link to the delete page to the menu itself
- There is no precedent for cross-linking administration pages like this in core.
2. Change the way blocks are created by the menu system
- Doesn't really address the OP's concern directly
- Great if you're the same person creating and deleting the block. Solves nothing if you are inheriting the site from somebody else
3. Make it clearer on the blocks administration screen that the block has been provided by the menu system
- Not totally clear how this would look in the UI yet
Remaining tasks
Decide on a proposed solution
User interface changes
There will be some minor changes to the way the block and menu system is presented to administrators
API changes
Potentially adding the ability to have menus without corresponding blocks
Original report by @budda
When a new menu is created it auto generates a block item on the ?q=admin/block
page.
This page doesn't make it clear what type of block this is, so some people might be confused about how to delete the block.
In the block 'Operations' column a 'delete' link for menu blocks could be provided and simply link to ?q=admin/menu/item/delete/<<block-menuid>>
This integrated everything a little better.
Comment | File | Size | Author |
---|---|---|---|
#8 | 33122-8.patch | 4.6 KB | Jody Lynn |
Comments
Comment #1
ricabrantes CreditAttribution: ricabrantes commentedThis is active??
Comment #2
greg.harveyMaybe the "configure" link could pull in the edit menu form too, so you don't have to go somewhere else to edit the menu while you're working in the Blocks page?
Comment #3
tstoecklerFor edit that doesn't work, because then there would be now way to configure the block title or the block visibility. I don't know whether this whole thing is a good idea, it establishes a pattern that's not used anywhere in core. And letting contrib modules handle their own block deletion patterns could (possibly) open up a whole other can of worms.
Moving to 8.x
Comment #4
Jody LynnI feel that the real issue is that menu module shouldn't create a new block for every menu with no way to prevent that. There should be a per-menu setting on menus for whether there should be a corresponding block.
Comment #5
rv0 CreditAttribution: rv0 commented@ Jody Lynn
I totally agree
By default, Menu should not create any blocks unless the user specifically asks for it.
Now the block admin gui gets cluttered with unused blocks, which are irrelevant when people use things like menu_block, og_menu.
A simple "Create block for this menu" setting would suffice.
Comment #6
rv0 CreditAttribution: rv0 commented"Expose this menu as block" would be the appropriate wording.
I suggest it would be on by default for the standard menus, but off when creating a new menu.
Changed title as it seems more descriptive.
Comment #7
tstoecklerJust for the record, I am -1 on this. I think it is quite a nice feature to have, that the blocks are created automatically.
Unsubscribing.
Comment #8
Jody LynnPatch includes upgrade path but no new tests for this feature.
I defaulted all menus to have the 'expose as block' on, to be conservative. I think the main use for turning it off would be programmatic menu creation or developers outputting menus in other ways. Turning it off for 'primary links' in bartik would be a good idea though.
Comment #9
thedavidmeister CreditAttribution: thedavidmeister commentedpatch no longer applies:
If we're going to take this approach, can we get a bit more discussion around why you would want a menu that does not have a block. I don't think that "Contrib modules provide better menu blocks" is a strong use-case for Core providing this new functionality. Realistically, if the maintainers of those contrib modules were bothered by "duplicate" menu blocks in the system, they'd hide the Core blocks themselves as they present new ones.
Perhaps more concerning though is that this patch seems to miss the fundamental concern of the OP which is clearly:
Changing the way a block is created originally does nothing to make the UI at admin/block clearer for block deletion.
May I suggest that a way forward could be to show more clearly in the blocks UI that a block is managed by the menu system?
Comment #10
ellanab CreditAttribution: ellanab commentedLooks like this issue is fixed. A delete button has been added to the block administration page on a per block basis.
Comment #11
thedavidmeister CreditAttribution: thedavidmeister commented