This is a follow-up feature request for #1702506: Admin links for mini panel content type and #1388476: Provide contextual links for mini panels. to add core Block integration to the mini panels contextual links.
The functionality that was added in #1702506: Admin links for mini panel content type works only when a mini panel is displayed inside a Panel, but not when it's displayed in a Drupal theme region using the core Block module or via contrib Context module.
Patch to follow in first comment.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | panels-mini_panels_blocks_contextual_links-1966020.patch | 1.24 KB | jwilson3 |
Comments
Comment #1
jwilson3Comment #2
jwilson3Comment #3
jwilson3Comment #4
damienmckennaSomeone really should turn on automatic testing for Panels.
Comment #5
damienmckennaI tested this out on a site with Panels 3.3 and it worked exactly as advertised, nice work James :)
Comment #6
jwilson3Thanks Damien.
It's worth noting that the only part of the patch that I'm not entirely happy with having to do is to use the
strpos()to test the block'sbidfor the module name, when there is a$block->modulemember that's supposed to provide just the info I need; however in my testing, the contextual link alter hook provides the$element['#element']['#block']->module === FALSEfor some unknown reason.The
bidis just a combination of module name and block delta separated by a dash, Eg, for my Footer mini-panel, bid = "panels_mini-footer". So in the endstrpos($bid, $modulename) === 0gives us the needed result.Comment #6.0
jwilson3Mention that this fixes integration with Context module as well.
Comment #7
japerryFixed!
http://drupalcode.org/project/panels.git/commit/1833f49