Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi Guys, Trying to get my block to display in a subtheme - header or subtheme - menu regions.
Couldn't get my block to show in these regions. Then I noticed there was no 'print render' in the page.tpl.html file for region-branding or region-menu.
Not sure what the logic was in not having this ability for those two regions (maybe someone would care to explain).
But could someone please confirm that it would be OK practice to mod my template page.tpl.html file to include something like:
<?php print render($page['branding']); ?>
in order to place blocks here?
Thanks
Comments
Comment #2
Subhransu.addweb CreditAttribution: Subhransu.addweb at AddWeb Solution Pvt. Ltd. commentedThis is the reason of the problem you are facing accordingly to me:
>>"region-branding" is only for logo, site name, site slogan.
>>"region-menu" only for main menu and secondary menu.
Please find the solution below:
Your custom block will not render. If you want to show your block then create one regions and set that into
page.tpl.php
file and set your block on newly created regions.Hope this help you.
Thanks!