Fusion core's region.tpl.php outputs HTML even if a region is empty.

Comments

OnkelTem’s picture

Status: Active » Needs review
StatusFileSize
new1.97 KB
webkenny’s picture

Status: Needs review » Needs work

I noticed it was node-top being rendered on node pages with no content in that region. I don't see that as being the case for all regions however. For example with no blocks in a footer, the footer markup doesn't render.

Seems the issue is here:

  <?php if (!$teaser): ?>
    <div id="node-top" class="node-top region nested">
      <?php print render($node_top); ?>
    </div>
  <?php endif; ?>

And here:

  <?php if (!$teaser): ?>
    <div id="node-bottom" class="node-bottom region nested">
      <?php print render($node_bottom); ?>
    </div>
  <?php endif; ?>

Can you verify that this is what you're seeing as well? The node top and bottom regions being output?

webkenny’s picture

Assigned: OnkelTem » webkenny
Status: Needs work » Needs review
StatusFileSize
new644 bytes

I went ahead and looked back at 6.x where the if statements including node_top and node_bottom were, waiting to be ported into 7.x; Patch attached. Please review and we'll get this into DEV.

webkenny’s picture

Just noting #1541826: Node bottom question as a duplicate since it addresses the issue as well.

  • Commit bd242f6 on master by Poieo:
    Issue #1772370 by webkenny: added check for $node_top & $node_bottom
    

  • Commit bd242f6 on master, 7.x-2.x by Poieo:
    Issue #1772370 by webkenny: added check for $node_top & $node_bottom
    
Poieo’s picture

Issue summary: View changes
Status: Needs review » Closed (fixed)