I'm the maintainer of Semantic Panels. I need to be able to alter newly created panes to allow site builders to set default styles.

My proposed solution is to add this in the panels_new_pane function:

  drupal_alter('panels_new_pane', $pane);

My use of this drupal_alter is related to #874002: Option to choose a default style for all new panes but this alter could be used for other stuff also, hence the separate issue.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

emattias’s picture

Status: Active » Needs review
FileSize
364 bytes
retrodans’s picture

FYI implemented this patch with no difficulties, very greatful for its existance.

Thanks,
Dan

evgeniysolodkov’s picture

Hello, Mattias!
I'm wondering if there any progress on making semantic style default for new panes. I've applyed this patch and didn't see any changes - No style is still default for new panes. I use the latest dev of Semantic Panels.
Anyway, thanks for great module, it makes life much easier!

caschbre’s picture

I'm successfully able to set the new pane style using this... however I haven't been able to figure out how to kick off the settings form for that new style. Any suggestions?

rahulbile’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community
FileSize
708 bytes

Patch seems to be working fine for me. Attached is the patch against 7.x-3.x.

Chris Gillis’s picture

#5 works for me. Any chance of a commit?

skstarne’s picture

#5 works great for me too.

Jackinloadup’s picture

#5 worked for my team. @sdboyer What else needs to be done to get this patch commited?

japerry’s picture

Status: Reviewed & tested by the community » Fixed

Just an alter? sweet. Committed.

  • japerry committed c7349b1 on 7.x-3.x authored by rahulbile
    Issue #1985980 by emattias, rahulbile: Allow altering of new panes
    

Status: Fixed » Closed (fixed)

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