Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Since CCL hooks in to hook_contextual_links_view_alter, it will only add contextual links to nodes or blocks that already have a contextual link.
The main content block (system-main) and the help block (system-help) are affected by this.
Comment | File | Size | Author |
---|---|---|---|
#4 | 1630556-ccl-remove-unsupported-blocks-from-available-options.patch | 798 bytes | barraponto |
Comments
Comment #1
bkoether CreditAttribution: bkoether commentedHi barraponto,
CCL is meant to be an extension of the core contextual module.
That means that you can add your custom links to elements that are supported by the core module.
The two blocks you reference above are special blocks that, to my understanding, are not meant to have contextual links.
Personally I also don't see much of a use case for these two blocks to have contextual links. Maybe you can explain a bit more what you're trying to accomplish.
I definitely don't see this as a bug, so I changed the category to support request.
Comment #2
bkoether CreditAttribution: bkoether commentedComment #3
barraponto CreditAttribution: barraponto commentedMy use case: I wanted to add a contact settings contextual link to the main content block on contact pages.
It's not that these blocks are not supported by core Contextual module, these blocks just don't get the Block module default contextual links. Any other module providing these blocks a contextual link would trigger CCL supporting them properly.
Anyway, I think adding hook_menu_alter and hook_block_view_alter just to support these two blocks more trouble than it's worth. Instead, CCL should remove these blocks from the available options.
Comment #4
barraponto CreditAttribution: barraponto commentedHere is patch.
Comment #5
bkoether CreditAttribution: bkoether commentedHi barraponto,
I agree with you. Hiding these blocks makes sense.
I added your patch to the dev version and it will go into 7.x-1.5.
Thanks,
Ben