Hello! I use a Drupal 7. I have two blocks in a header region and need to display them like it is shown in a code below

<div class="header">
    <div class="header-top">        
        <div class="ca-r">
            Here I need to display a first block
        </div>        
    </div><!-- header-top -->            
    
    <nav class="navbar navbar-default">        
             Here I need to display a second block
    </nav>        
</div><!-- header -->

This code from a region--header.tpl.php

Comments

arulraj’s picture

Hope you have created header region for your theme.
You can assign block to header region through admin interface.
1. Logged in as admin.
2. Goto "admin/structure/block" assign block to required region.

wolfgan’s picture

I have a header region in my theme and I have two blocks assigned to this region through an admin interface. I themed a header in a region--header.tpl.php, and I need show my blocks in separate places of the region. Blocks I themed too through tpl files. Into the region I have access to a $content variable that displays only both blocks together. How to do output for every block separately?

arulraj’s picture

In same region if your assigning any number of blocks, its get printed by $content variable only. However while rendering block in region drupal will have unique wrapper div.

You can check your unique wrapper div using firebug, If you want add any custom class for theming pls use Block Class moudle to achieve the same.

wolfgan’s picture

arulraj thank for your reply