For SEO purposes I needed to change the default <h2> that wraps a pane title.
In this thread, I found this code, which I adapted to my case.
I am using panels to display a node's content and needed the node content to be in <h1>, and also the default pane's wrap to be <h3> (because a node can have an <h2> in it as well). The code below achieved that:
(inside panels-pane.tpl copied in the theme folder)
<?php if ($pane->type == 'node_content' && $pane->subtype == 'node_content'): ?>
<h1<?php print $title_attributes; ?>><?php print $title; ?></h1>
<?php else: ?>
<h3<?php print $title_attributes; ?>><?php print $title; ?></h3>
<?php endif; ?>However I still need to alter this code to have a taxonomy term variant, which has a view linked to taxonomy term, display the view's block title in H1. My problem is I don't know which values the $pane->type == & $pane->subtype == 'node_content' can take. I experimented with $pane->type == 'taxonomy_content'. Also I do not know how to insert multiple conditions with "If or" in PHP, because my end goal is to have pane titles in h1 if it is a node or a taxonomy variant containing a view block.
Comments
Comment #1
Perseids commentedProbably not ideal but the following code gets me what I want:
Comment #2
joelpittetSeems like you worked around the issue.