I've created a fieldable panel pane that has two fields, a title and a body. My template file looks like this:
<div class="sidebar-pane">
<h2 class="pane-title">
<?php print render($content['field_pane_title']); ?>
</h2>
<div class="pane-content">
<?php print render($content['field_body']); ?>
</div>
</div>
This seems fairly basic. Now, when I actually add one of these panes to a page, this is the DOM that is spit out:
<div class="sidebar-pane">
<h2 class="pane-title"></h2>
<h3 class="field-label"></h3>
Test Pane
<div class="pane-content">
<h3 class="field-label"></h3>
<p>This is a test body.</p>
</div>
</div>
Ignoring the fact that it's printing out empty field-label elements, why is the pane-title field being printed outside the pane-title h2 element? Is there a better way to be doing this? Thanks!