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.

Comments

jwilson3’s picture

jwilson3’s picture

jwilson3’s picture

Status: Active » Needs review
damienmckenna’s picture

Someone really should turn on automatic testing for Panels.

damienmckenna’s picture

Version: 7.x-3.3 » 7.x-3.x-dev
Status: Needs review » Reviewed & tested by the community

I tested this out on a site with Panels 3.3 and it worked exactly as advertised, nice work James :)

jwilson3’s picture

Thanks 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's bid for the module name, when there is a $block->module member 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 === FALSE for some unknown reason.

The bid is 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 end strpos($bid, $modulename) === 0 gives us the needed result.

jwilson3’s picture

Issue summary: View changes

Mention that this fixes integration with Context module as well.

japerry’s picture

Issue summary: View changes
Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

  • Commit 1833f49 on 7.x-3.x, 8.x-3.x authored by jwilson3, committed by japerry:
    Issue #1966020 by jwilson3: Contextual links for mini panels placed as...