Closed (fixed)
Project:
Panels
Version:
7.x-3.x-dev
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
18 Jun 2014 at 22:50 UTC
Updated:
15 May 2015 at 12:21 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
dobe commentedComment #3
michelleI applied the CTools patch and used it to change my title to an H5. When I went to display the page, though, I got this:
Notice: Undefined variable: title_heading in include() (line 30 of ../panels/templates/panels-pane.tpl.php).
Notice: Undefined variable: title_heading in include() (line 32 of ../panels/templates/panels-pane.tpl.php).
I checked and the heading is saving but it's not getting picked up by Panels.
Comment #4
michelleI've spent some more time trying to figure this out and have gotten to a point where I am baffled. I put a breakpoint on the last line of function template_preprocess_panels_pane() which is:
$vars['content'] = !empty($content->content) ? $content->content : '';
Before running that line, $vars['content']->title_heading = "h3" and $content->title_heading = "h3"
Then I run that line and suddenly $vars['content'] and $content are no longer objects but rather strings with the contents in it all marked up and "title_heading" is no where to be seen. It never ends up in the template so the patch code fails. I have no idea why. At this point, I'm afraid I'm going to have to stop because I've spent more time on this one issue than I should have (got sucked into the mystery. LOL!).
Hopefully what I've written can give you some idea of what might be wrong.
Comment #5
mrjmd commentedThis is a slight modification that adds the value during template_preprocess_panels_pane(). Everything worked for me once I added this.
Comment #6
mrjmd commentedComment #7
dobe commentedI just tested this with @mrjmd's preprocess addition and it works as originally designed. I believe this will be RTBC if the ctools version gets committed.
Comment #8
michelleTested along with the CTools patch. See my comment. Looks good!
Comment #10
japerryLooks good along side the ctools patch. Committed!
Comment #12
gmclelland commentedSo now that this is committed, how do I now change the default heading tags of my panes to an h3 instead of an h2?
I did drush vset override_title_heading h3 but it didn't change anything.
Comment #13
gmclelland commentedI also tried adding $conf['override_title_heading'] = 'h3'; to my settings.php but it didn’t seem to work
Comment #14
gmclelland commentedHas anyone been able to change the default Heading tag from an H2 to H3 for all pane headers? Setting header pane overrides works per pane now, but I can't seem to change the default tag for all panes.
I used to change this by copying the panels-pane.tpl.php to my theme. I imagine this will impact a lot of people site since the Zen theme uses an H3 instead of H2s for pane titles.
Comment #15
gmclelland commentedHere is the followup to this issue at #2488280: Can't override the default Pane title heading tag if anyone wants to help test.
Comment #16
webhippies commentedHey i think it works great with most of the panes but what about custom content pane titles???