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.
Display Suite can inject css classes into panels layouts, but only if...
Note that this will only work if the template has a $class variable.
All this takes is changing this...
<div class="panel-display panel-1col clearfix" <?php if (!empty($css_id)) { print "id=\"$css_id\""; } ?>>
to this...
<div class="panel-display panel-1col clearfix<?php if (!empty($class)) { print " $class"; } ?>" <?php if (!empty($css_id)) { print "id=\"$css_id\""; } ?>>
Comments
Comment #1
fallenturtle CreditAttribution: fallenturtle commentedI'm surprised there aren't more requests for this. I take it this is dead in the water based on the age of the Issue?
I think the code would be like (based on the variables used by the DS templates):
But from what I can tell those variables aren't available to Panel templates without the use of some preprocessing stuff I'd imagine (which is beyond my abilities).