By ericquigley on
I hate being such an amateur. Can someone tell me the proper methodology for overriding block.tpl.php? This is what I've done so far:
- Using Drupal 7 with Zen and a starterkit subtheme
- Identified block module and delta using Firebug; block-block-2
- Copied block.tpl.php into my subtheme
- Made a copy and renamed it block-block-2.tpl.php
That's it. The system doesn't recognize it. Was there something else I needed to do? Maybe in template.php?
Thanks to anyone and everyone and sorry for what is probably a dumb question.
Comments
Try clearing cache data on
Try clearing cache data on the site configuration / Performance page.
Cleared the cache
Still not recognizing the override. Might this be a bug in Zen? I find it hard to believe that I would be the first to find a bug this big - I'm usually way late to these parties. Thanks for the reply!
I hope that somebody who
I hope that somebody who really knows what they are talking about chimes in to correct me, but I think that Drupal 7 requires two dashes, so it should be something like block--block-2.tpl.php. However, I haven't got around to overriding templates in my experimentation with Drupal 7 yet.
That might be it
That might be it
Close, the template
Close, the template suggestion that was block-block-2.tpl.php is now block--block--2.tpl.php in Drupal 7.
i think it's a drupal 7 bug
i tried the '--' instead of '-' but still having the same problem, i think there's some bug in drupal 7
Hi, I had the same problem as
Hi,
I had the same problem as you, and followed the same steps that you outlined.
The file name that finally took for me was:
block--block--2.tpl.php
Good luck!
Worked for me using this
Worked for me using this pattern - block--[module]--[delta].tpl.php
For example to use custom template for main-menu block, your template file name should look like this - block--system--main-menu.tpl.php.
You can get delta using firebug cause for Drupal 7 default block ID contruct is
http://passivemanagement.net/