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.
In template.php we should do something like this to avoid php notices.
function aurora_preprocess_panels_pane(&$vars) {
$subtype = isset($vars['pane']->subtype) ? $vars['pane']->subtype : '';
$layout = isset($vars['display']->layout) ? $vars['display']->layout : '';
$vars['theme_hook_suggestions'][] = 'panels_pane__' . $layout;
$vars['theme_hook_suggestions'][] = 'panels_pane__' . $subtype;
$vars['theme_hook_suggestions'][] = 'panels_pane__' . $layout . '__' . $subtype;
}
Some panes don't have a subtype or layout. Let me know if you need a patch.
Comment | File | Size | Author |
---|---|---|---|
#3 | check-panel-pane-vars-2106777-3.patch | 1.01 KB | awolfey |
Comments
Comment #1
Snugug CreditAttribution: Snugug commentedPatches always welcome
Comment #2
awolfey CreditAttribution: awolfey commentedActually it would be much better to not add the suggestions if the vars aren't there.
Comment #3
awolfey CreditAttribution: awolfey commentedHere's a patch. There's probably a more elegant way to do this.
Comment #5
iamcarrico CreditAttribution: iamcarrico commentedApplied the patch, and cleaned it up a titch. Thank you!