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,
I'm puzzled by the following behavior: if I move a menu block which I created to appear in a sidebar region to the content area, then the title (which I've overridden) appears. If that same block appears in the sidebar, the title does not appear. It's not hidden by CSS - it's simply not present at all in the source for the block.
Has anyone encountered this before?
Thanks,
Lee
Comments
Comment #1
LNakamura CreditAttribution: LNakamura commentedI added a couple of strategic drupal_set_message() statements and have discovered the following: from the perspective of menu_block_block_view($delta = '') in sites\all\modules\menu_block\menu_block.module, the block title is present both times the block is rendered after menu_tree_build($config) has been called. However, by the time the sidebar block (only) is rendered in modules\block\block.tpl.php, the title is no longer present - thus the following conditional fails, and the drupal_set_message() I added (as well as the printing of the title, of course) is never hit:
Anybody have a clue as to what would cause this behavior?
Comment #2
LNakamura CreditAttribution: LNakamura commentedI ended up overriding block.tpl.php (as block--menu-block.tpl.php) so I could modify it in this way:
Still hoping someone might have some insight into why this was necessary in the first place...
Thanks,
Lee
Comment #3
JohnAlbinThe block title is a configuration provided by the block module. It is configurable per block per theme. And its not related to the menu_block module.