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\""; } ?>>

REF: #1375998: Getting custom classes to work

Comments

fallenturtle’s picture

I'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):

  <div class="region region-two-50-first <?php print $left_classes; ?>">

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).

japerry’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

Drupal 7 is no longer supported, closing.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.