Greetings,

I posted a patch on the ctools queue that relates to this. https://www.drupal.org/node/2288741. The objective would be to allow for configuration of Panels pane title headings.

-Jesse

Comments

dobe’s picture

StatusFileSize
new535 bytes

michelle’s picture

Status: Needs review » Needs work

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

michelle’s picture

I'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.

mrjmd’s picture

This is a slight modification that adds the value during template_preprocess_panels_pane(). Everything worked for me once I added this.

mrjmd’s picture

Status: Needs work » Needs review
dobe’s picture

Status: Needs review » Reviewed & tested by the community

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

michelle’s picture

Tested along with the CTools patch. See my comment. Looks good!

  • japerry committed 5322b18 on 7.x-3.x authored by dobe
    Issue #2288747 by dobe, mrjmd: Panels Title Headings
    
japerry’s picture

Status: Reviewed & tested by the community » Fixed

Looks good along side the ctools patch. Committed!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

gmclelland’s picture

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

gmclelland’s picture

I also tried adding $conf['override_title_heading'] = 'h3'; to my settings.php but it didn’t seem to work

gmclelland’s picture

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

gmclelland’s picture

Here is the followup to this issue at #2488280: Can't override the default Pane title heading tag if anyone wants to help test.

webhippies’s picture

Hey i think it works great with most of the panes but what about custom content pane titles???