I want my Drupal 7 theme to use a custom block.tpl.php for my navigation bar (Defined: regions[navigation] = Navigation bar). So I copied block.tpl.php from the block module to my theme directory and tried to give it different names (following different guides on the web). None of them seemed to work. Then I wanted to make sure it was a naming problem so I changed the name back to block.tpl.php and changed its contents (removed the h2-tag for the title). I reloaded my site but nothing happened so there must be another problem.

Any ideas on how to fix this?



Most likely you just need to clear Drupal's caches.

Template file implementations are cached in the theme registry so you need to clear it for new files/theme functions to get picked up.

You can do so either at http://mysite.com/admin/config/development/performance or by using Drush.


If you want to know which name must have the template for block (or regions, or other elements) you could try Devel Themer.

  • I would insist you to use devel themer module and find the correct template name instead of having a try at all the names. – Gladiator Jul 17 '12 at 13:47

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.