Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hello,
This little patch just simply add a button which give the ability to set CSS ID / classes to a panel region via IPE.
I wanted this option so I share it with you.
Best regards.
Comment | File | Size | Author |
---|---|---|---|
#31 | move-image-1570120-31.patch | 1.61 KB | msti |
#26 | shot_20161111-163109.png | 13.29 KB | msti |
#25 | panels-css-ipe-button-1570120-25.patch | 1.34 KB | msti |
#25 | icon-css.png | 449 bytes | msti |
#20 | Screen Shot 2015-09-22 at 4.50.02 PM.png | 16.18 KB | joelstein |
Comments
Comment #1
kingfisher64 CreditAttribution: kingfisher64 commentedWorks great. Would perhaps look better if it was a graphic rather than the word 'style' to fit into the panels interface. Perhaps a hash tag icon to represent an ID.
Thank you though it's exactly what I was after. Very very useful.
Comment #2
drupalycious CreditAttribution: drupalycious commentedHello,
your patch is not ready to be ported, it broke my test installation.
As soon as I downloaded back a fresh panel module (without the patch) and cleared manually all my caches in the database, everything was back to normal.
Comment #3
drupalycious CreditAttribution: drupalycious commentedFYI : Status settings for an issue
This patch will add a very nice option to panels.
Comment #4
merlinofchaos CreditAttribution: merlinofchaos commentedAh yes, wrong status caused this patch to never be seen.
sp-drupy: Your problem is more likely a bug in drush that I've run into from time to time. cd out of the panels directory and run your drush cc all from there.
Comment #5
kingfisher64 CreditAttribution: kingfisher64 commentedThe patch worked fine for me. The patch was applied against 3.3 version. Screenshot attached
What file have you applied the patch against? Apologies if this seems a daft question. It's to be applied against panels/panels_ipe/panels_ipe.module file. My patched working version is attached.
Comment #6
kingfisher64 CreditAttribution: kingfisher64 commented@Magic Man Merlin
Can we have this in the dev asap? Maybe needs a graphic rather than just the wording but, it's been invaluable to me already.
Comment #7
drupalycious CreditAttribution: drupalycious commentedI applied the patch again, and no bug occurred.
But I don't see the buttons... (I did clear caches and updb)
Do you see them in the panel page variant content layout or directly in the website page while viewing the panel?
I applied the patch against 7.x-3.x-dev.
Thanks
Comment #8
kingfisher64 CreditAttribution: kingfisher64 commentedDirectly on the webpage. IPE editor has to be selected over standard panels when setting up the panel page. Once you click the black buttons on the bottom of the page and the panels pop up you should see the changes.
Comment #9
drupalycious CreditAttribution: drupalycious commentedThank you, I was not using ipe actually.
But the style box only appears in the panes themselves (mirroring an existing option) not in the regions panes.
See my image, the region panes are in blue, and the style box is missing.
Comment #10
drupalycious CreditAttribution: drupalycious commentedI think I misunderstood the use case, and this is actually doing what it is supposed to do.
It adds a button to change the css of a pane in a region.
I was looking for something that would let me apply a css class to a whole region.
For example if ones wants to change the css class of ".rounded-corner" but just for a region it is not presently possible. You have to end changing the css class of all ".rounded-corner" in your website.
So +1 for this patch, I might write a feature request then ;)
Comment #11
mrfelton CreditAttribution: mrfelton commentedDo we really need a separate button for this? It would seem to make more sense to merge these settings into the 'Region style' button that we already have (the paintbrush icon). I can't see that it makes much sense to provide two different places to go and edit style properties.
Comment #12
kingfisher64 CreditAttribution: kingfisher64 commentedYep I agree. It would be great to have this in the next version. I did wonder why there was a separate button. I second mrfelton's view so move the features in this patch into the existing settings paintbrush section.
Comment #13
kingfisher64 CreditAttribution: kingfisher64 commentedHas anything been decided on this?
What about taking joel rotelli's patch and applying it so the class options are placed inside the paintbrush icon settings as suggested instead of a seperate button.
Then maybe this could be committed to core merlin?
It's a very useful feature to have and could do with being committed.
Comment #14
gmclelland CreditAttribution: gmclelland commentedMan, I sure would like to see this happen. It would make it a lot easier to apply styling.
Comment #15
tchopshop CreditAttribution: tchopshop commentedThis would be invaluable, but if it goes in the style area, then it should be *in addition* to the other styles, not as a choice between different styles.
Comment #16
kingfisher64 CreditAttribution: kingfisher64 commentedBump.
@joel rotelli given it's your patch what do you think about mrfelton's suggestion on #11 to move this functionality into the region style button?
Maybe it would get committed to panels core merlin if this happened?
Comment #17
joelrotelli CreditAttribution: joelrotelli commentedYep I think it's a good idea !
Comment #18
mglamanI think it'd be good to expose the text boxes in styles modal popup, but not replace a chosen style.
For what it is worth, found this in Panopoly: #2054095: Create Style Plugin for a Custom CSS Class. It adds a new button called "CSS." If the thought is to consolidate, this form within the styles modal would be fitting.
Comment #19
mrfelton CreditAttribution: mrfelton commentedMarked #2054095: Create Style Plugin for a Custom CSS Class as a duplicate of this, but attaching @arshadcn's patch from that issue for reference as its a good starting point.
Comment #20
joelstein CreditAttribution: joelstein commentedHere's a patch to Panels IPE based on #19. It adds a "CSS" button after the style button, if the user can administer the advanced pane settings (the same permission they need to edit CSS properties on the backend). There's no icon, but the text "CSS" doesn't look half-bad. I think we can use this as-is.
Comment #21
Koen.Pasman CreditAttribution: Koen.Pasman at Aubergine IT commentedPatch in #20 does it for me :)
Comment #22
mstiPatch #20 works for me too
Thx!
Comment #23
mstiComment #24
japerryehh. While the rest of the patch is good, w/o an image I don't think this passes for me. Different fonts and colors can make the css link look really bad. Lets get an image in here :)
Comment #25
mstiHere is an updated patch with an image
Comment #26
mstiHere is how the image button looks.
Comment #28
japerryOkay, this looks good now. Thanks! Committed.
Comment #29
joelstein CreditAttribution: joelstein commentedFYI, /panels_ipe/css/panels_ipe.css is looking for this new icon-css.png in /panels_ipe/images, but in the 7.x-3.9 release this file was added to /images. We probably need to move this file to /panels_ipe/images, or update the CSS reference.
Comment #30
Anonymous (not verified) CreditAttribution: Anonymous commentedWith the issue with the css and image location, this should be marked as needs work to get that sorted out.
Comment #31
mstiThis patch moves the file to the correct location.
Let's see if it will work
Comment #32
zaporyliePatch applies smoothly and it does what needs to be done to fix broken commit 0b06ac7cd5b600fc1a44a493926e68afac5a9484. IMO #31 should be committed and released ASAP, otherwise people would have to patch stable release for next couple of months or use dev release.
Ideally we would create follow-up issue for this kind of operation (fixing regressions introduced by the issue) but it's probably ok to just fix it here.
Comment #33
b_sharpe CreditAttribution: b_sharpe at ImageX commented+1 for #31 being committed
Comment #34
byronveale CreditAttribution: byronveale commented+1 for the patch in comment #31 as well; it's working for us when testing in our Panopoly-based distribution.
Comment #35
byronveale CreditAttribution: byronveale commented+ another 1 for #31, it's been committed to Panopoly.
Comment #36
byronveale CreditAttribution: byronveale commented"Bump!" Two years on, this patch still works a treat for us, on a Panoply-based platform with over 250 sites.
Comment #37
joelpittetThis looks to be already committed in the dev release.