Hi,
I want an image in the title of a block, but the only sollutions I could find where using either CSS or block.tpl.php. However, if I use these to create an image as a title, I'll edit it for every block. I only need it as the title of one block. How can I do this?

I realise this is probably a stupid question, but I just don't know how to solve this.

Comments

yuriy.babenko’s picture

In your theme's folder, create a file called 'block-#.tpl.php', replacing '#' with the ID of your block (if you edit a block, you can see its ID in the URL). Then copy everything from block.tpl.php to your new file, and add your image. Now only that particular block will have the image.
---
Yuriy Babenko
www.yubastudios.com

---
Yuriy Babenko | Technical Consultant & Senior Developer
http://yuriybabenko.com

Eiersneijer’s picture

Wow, it's really that simple! Thanks a lot.

mademarest’s picture

I'm using a Theme that does not have a block.tpl.php file in the folder (theme: Blix).

Any advice?

thanks much!

Nitesh Singh’s picture

It really works fine ... if some one want to put image right after the block title than he can try this...

line no 8..................img src="/drupal/themes/garland/images/block_image.png" alt="" width="33" height="32" .....plz add tags

Thanks
Nitesh Singh