I am new to drupal 7 and really struggling with this one:


I have a region called navigation

in my .info regions[navigation] = Navigation bar

for this region I want to use a custom tpl.php file. I have tried


like in the example, and put it at the theme root and in the templates folder with no luck. I've cleared the cache and insured that a standard working block.tpl.php is in place. To no avail.


I needed BOTH a region--navigation.tpl.php AND a block--navigation.tpl.php with a double -- both times.

1000 views on this question earned me the popular question badge. But you guys can't find it in your heart to upvote it more than 1 time. Laaaammmmmeeee....

  • Regions are for different Blocks, Try creating same block with different theme. Add visibility configuration using page arguments. – niksmac Apr 18 '12 at 4:06
  • So its not be region but by the block itself? – Fresheyeball Apr 18 '12 at 4:08
  • Yeah. But lets wait some minutes for other solutions. – niksmac Apr 18 '12 at 4:08
  • here we go, +1 :) – Tyler Durden Jan 7 '13 at 11:44

To use a custom tpl.php file for "navigation" region, you should use region--navigation.tpl.php

  • Dang it. It need to be the block. Its main menu if that helps. – Fresheyeball Apr 18 '12 at 4:47
  • If you need to use "block-navigation.tpl.php", you should also have a custom block.tpl.php for your theme. See this(drupal.org/node/104319) for more details. – Varshith Apr 18 '12 at 4:59
  • 1
    That documentation page is for Drupal 5. drupal.org/node/1089656 is the appropriate documentation page for Drupal 7. The relevant naming pattern is block--[region].tpl.php and the generic template (block.tpl.php) is no longer needed in D7 in order to use a specific template (block--[region].tpl.php). – sheena_d Apr 18 '12 at 8:03
  • After looking at "block-navigation.tpl.php" in the question, I was misled. Sorry, for the confusion I caused. ty sheena – Varshith Apr 18 '12 at 11:29
  • All good. I am just here to learn ;) – Fresheyeball Apr 19 '12 at 5:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.