Posted by Eiersneijer on July 10, 2008 at 6:33pm
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
In your theme's folder,
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
http://yuriybabenko.com
My Drupal tutorials: http://yuriybabenko.com/blog/tag/tutorials
Wow, it's really that
Wow, it's really that simple! Thanks a lot.
no block.tpl.php ???
I'm using a Theme that does not have a block.tpl.php file in the folder (theme: Blix).
Any advice?
thanks much!
Gud one
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