Drupal Answers is a question and answer site for Drupal developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I Copied the file


to my subtheme


I made another 2 copies and renamed them to


In the subtheme.info file it says regions[sidebar_first] = 'Primary'

The block.tpl override works but the sidebar-first.tpl.php does not get overridden.

What am I doing wrong?

share|improve this question
I have changed the underscore but it doesn't fix my issue. – sasdev Feb 23 '14 at 9:43
You've cleared the cache as well? – Neograph734 Feb 23 '14 at 9:46
up vote 3 down vote accepted

The name of your template block--sidebar_first.tpl.php is correct. Clear the cache to override the template. OR Put this function in template.php and clear the cache. You will get the suggested template for your block.

On suggested name replace double underscore with double dash for your tpl file, and clear the cache.

function THEMENAME_preprocess_block(&$variables) {
share|improve this answer
Using the returned function names. block--blockgroup-sidebar.tpl.php does not work. block--block__52.tpl.php works. Witch is a little odd to me. – sasdev Feb 23 '14 at 10:01
The block--blockgroup_sidebar.tpl.php doesnt work, even after clearing cache. – sasdev Feb 23 '14 at 10:41
can you put here all the actual name suggested by above function? – Rupesh Feb 23 '14 at 10:43
Array ( [0] => block__blockgroup-sidebar [1] => block__block [2] => block__block__52 ) Array ( [0] => block__blockgroup-sidebar [1] => block__system [2] => block__system__main_menu ) Array ( [0] => block__blockgroup-sidebar [1] => block__block [2] => block__block__53 ) – sasdev Feb 23 '14 at 10:46
block--blockgroup-sidebar.tpl.php is correct as you used earlier. May be some other module override this template. – Rupesh Feb 23 '14 at 10:51

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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