Closed (fixed)
Project:
Panels
Version:
6.x-3.8
Component:
Plugins - display renderers
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
7 Dec 2010 at 13:55 UTC
Updated:
29 Mar 2016 at 19:17 UTC
Jump to comment: Most recent
Comments
Comment #1
zach harkey commentedYou can override the default template panels-pane.tpl.php by copying it from the module (...modules/panels/templates/panels-pane.tpl.php) into your theme directory. The markup you want to change is around line 28:
Change those h2's to h1's, save the file and clear the theme registry.
Comment #2
Trunkhorn commentedI'm not the thread author, but I have to ask... Wouldn't that cause every Pane title to be an H1?
If so, wouldn't that clash with the purpose of H1?
Comment #3
merlinofchaos commentedOk, I'm a little confused.
The title says panel pane title.
The text says panel page title.
page titles are normally rendered by page.tpl.php, so Panels has no control over it, unless you're using panels everywhere. If you're using panels everywhere, the page title content type can select what markup it uses.
If it's pane title, then Zach answered the question adequately.
Comment #5
spikeerob commentedIf you are looking for a way of changing the pane title html in panels-pane.tpl.php depending on if the the pane is providing the panel title or not the answer lies in the $display object.
For example
Comment #6
greenavus commentedThanks a lot zach. It worked
Comment #7
suldan commentedWith the if statement in the panels-pane.tpl.php the h2-sequence will be printed when $title is loaded, even when the title is being overwritten and printed elsewhere on the page, i.e. in a pane with a h1 around it. Then it would look like this:
I would like panels to print my nodetitle (I dont want to print $title in the page.tpl.php because I want it inside a pane) with a h1 around it and without the emtpy h2 tag. Any ideas?
Comment #8
marios88 commentedThanks Zach, worked like a charm!
Don't forget to go to theme settings and press save to load the new file!
Comment #9
intyms commented@spikeerob
Thank you.
@suldan
The solution from #5 works for me.
I have posted the solution from #5 here too:
#1112596: An empty <h2 class="pane-title"></h2> is printing above the title.
Comment #10
tchi commentedI tried the solution from #5. But I didn't get it to work.
I copied the panels-pane.tpl.php in my theme folder and changed the code like in #5.
But, I didn't understand what settings I need on my titles to differ between h1 and h2?
I have a panels with two regions. In one region I want a h1 title-tag and in the other region a h2 title-tag.
Maybe someone can help me? Thanks.
Comment #11
zach harkey commentedWhat kind of panes are you trying to use? Sometimes its easier to just let panes provide their own headers.
For example, with custom content panes and blocks you can just include the header markup you want in the body of the pane. For view panes, you can put whatever header markup you want into the view's header field. If it comes down to it, you can add a custom content pane to hold a custom header.
Comment #12
skdrupal88I use Panels everywhere, next code output only PAGE titles as H1, other panes have H2 title tags.
Comment #13
Anonymous (not verified) commentedI still get an empty
<h2>with solution #12 and an empty<h2 class="pane-title">with solution #5I use Panels 3.10, not Panels everywhere. Something must have changed since 4 years ago I guess. I hope someone can point me in the right direction.
Comment #14
icf-vpathak commentedThanks @Zach and @spikeerob your solution helped.