When you create a region in the custom Panels layout, you have an option to add a custom CSS class. A value entered here is saved with the Panel, but the rendered output doesn't include the class. The Aurora docs mention using hook_aurora_layout_attributes_alter()
to add attributes, which is fine, but without this custom class, you must rely on the internally generated IDs (main-row, 1, 2, etc.) to reference the regions so that you can add the attributes. This seems a little ambiguous and I have concerns about it working consistently in all cases. Are these concerns valid and/or is there a more proper way to reference the regions individually so that they can be assigned to specific grids?
Comments
Comment #1
cameron prince CreditAttribution: cameron prince commentedI took this a little further and can now confirm with certainty that using
hook_aurora_layout_attributes_alter()
doesn't solve the problem.The following hook was added to my sub-theme's template.php.
Using this allows me to do this in my layouts partial:
This all works fine until a second panel page is added. Since the $attributes array provides no element for us to determine the active panel page, the new classes are added to them all.
I hope I'm missing something here, but without the custom class per region, this seems really handicapped.
Comment #2
DamienMcKennaThis is a bug, any classes added via the Panels interface should be displayed in the theme.
Comment #3
iamcarrico CreditAttribution: iamcarrico commentedAfter talking it over with @snugug, we are removing the panels layout from the next release.
Why? Because this is a poor way of implementing this functionality, and snugug did not realize it. Instead, you should create your own custom panels layout, and do the code there. This has a couple HUGE advantages:
Some links on how to do this:
https://drupal.org/node/495654
http://drupalize.me/videos/custom-panels-layouts
Comment #4
DamienMcKennaGiven that the existing release includes this, you need to add some documentation to the theme's README.txt file and project page explaining why and provide some links.
Comment #5
iamcarrico CreditAttribution: iamcarrico commentedThe project page already included information, I added the links above. I also pushed that information into the README.md, and within the theme is an example of a sample layout. I might attempt to even add this to the compass extension somehow.
Comment #6
iamcarrico CreditAttribution: iamcarrico commentedRelated: this is also why we are not pushing the release for a week.
Comment #7
iamcarrico CreditAttribution: iamcarrico commentedRelated: this is also why we are not pushing the release for a week.
Comment #8
DamienMcKenna@ChinggizKhan: Sounds good :)