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.
adaptivetheme/at_core/templates/panels-pane.tpl.php has a bug regarding the pane title.
As of panels 7.x-3.4, users can change the pane title's tag to something different than <h2>
.
Currently, adaptivetheme/at_core/templates/panels-pane.tpl.php code reads as:
<?php print render($title_prefix); ?>
<?php if ($title): ?>
<h2<?php print $title_attributes; ?>><?php print $title; ?></h2>
<?php endif; ?>
<?php print render($title_suffix); ?>
It needs to be changed to:
<?php print render($title_prefix); ?>
<?php if ($title): ?>
<<?php print $title_heading; ?><?php print $title_attributes; ?>>
<?php print $title; ?>
</<?php print $title_heading; ?>>
<?php endif; ?>
<?php print render($title_suffix); ?>
I'm working behind a proxy so I'm not really able to create a proper patch using git, but hopefully the attached file will suffice.
Comment | File | Size | Author |
---|---|---|---|
at_core-panels-pane-title.patch | 519 bytes | aseabrook |
Comments
Comment #2
aseabrook CreditAttribution: aseabrook as a volunteer commentedComment #3
Jeff Burnz CreditAttribution: Jeff Burnz commentedComment #4
Jeff Burnz CreditAttribution: Jeff Burnz commentedI haven't tested with this version of Panels as yet, do you know if $title_heading has a default value or we need to set it to h2 for BC?
Comment #5
aseabrook CreditAttribution: aseabrook as a volunteer commentedHey Jeff, I believe $title_heading is defaulted to h2 (the default in the drop-down is set to h2 in the panel page settings) and panel page settings require you to choose from only the available options in the array (h1, h2, h3, h4, h5, h6, span, div). Sorry it took a while to get back to you here, been out sick for a while.