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.
When a reusable custom content pane is added to a panel, the panel pane adds generic css classes by position (e.g. pane-1, pane-2, pane-3). These change if the pane's are re-ordered. Sometimes it is helpful to have a CSS class that refers to a specific reusable custom content pane regardless of the pane's position in the panel. This patch adds the custom content pane's machine name as an additional CSS class.
Comment | File | Size | Author |
---|---|---|---|
panels_custom_content_pane_css_class.patch | 1009 bytes | drupal_was_my_past | |
Comments
Comment #1
drupal_was_my_past CreditAttribution: drupal_was_my_past commentedSetting status to needs review since it includes a patch for review.
Comment #2
merlinofchaos CreditAttribution: merlinofchaos commentedI believe it would be better if the reusable type added this via $pane->css_class rather than hardcoding it into the preprocess.
Comment #3
gmclelland CreditAttribution: gmclelland commentedI would love to see this as well. Unless I'm missing it, I don't see any systematic way of styling specific custom content panes without the machine name being available as a css class? Of course you can add a class manually to each pane in the mean time.