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.
I am having trouble attaching id/class attributes using Panels Everywhere. I can add via the site template UI but they don't get rendered. Is this an Omega 4 or PE issue?
Comments
Comment #1
pkiff CreditAttribution: pkiff commentedI'm using the latest recommended versions of Omega (7.x-4.2) and Panels Everywhere (7.x-1.0-rc1), with an Omega subtheme, and I am not experiencing this problem on a production site.
Maybe there is a problem with your subtheme? Or your panels layout? Or some custom template you are using?
I'm using a custom theme page layout.tpl.php file, based on panels-pane.tpl.php. In a default Omega subtheme, the CSS classes and ids for each panel are I think inserted by that template via the $attributes variable inside the opening div tag. This is true whether the panel appears in a regular panel or in a "Panels Everywhere" panel, I think.
Are you using a custom template? Do you know if that variable is rendering properly?
Phil.
Comment #2
eft CreditAttribution: eft commentedPhil,
Thanks for the feedback. On further testing I can confirm the class attributes are getting added as required.
However, the css_id variable (used by panels) is not getting added to the attributes array. This appears to be because I am using a custom Omega layout and the various functions used to manage attributes do not add the value of the css_id variable to the attributes array. This may be by design - I'm not sure.
Comment #3
pkiff CreditAttribution: pkiff commentedI just tested this on my local testbed, and found that both custom ids and custom classes seem to be added fine in my config. My custom sub-theme does not do any additional processing on the $attributes, and I'm not manipulating these things in any custom pre-process files. I would suspect there is a problem in your customizations.
I'm not actually sure how or where the attributes array gets built, or which variables might go into building it, but you should find a default preprocess file in this folder that appears connected to the id values:
...omega\preprocess\panels\panels-pane.preprocess.inc
The problems you are having are definitely not by design, but I'm not sure how to track them down from here.