How do you update the icons for the blocks?
sweetback - July 15, 2009 - 01:37
| Project: | Zero Point |
| Version: | 6.x-1.7 |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
I can not figure out how I can change what icons show up for the blocks! I have tried inputting classes in the block module, but there is code added around it so any icon shows up inside the outer box. Is there a simple way to do this? I would like to add some icons to custom blocks. Any help would be greatly appreciated!

#1
#2
Take a look at /css/block-icons-32.css to see how to put icons for blocks. You can repeat that method or use your own. I advise you to do custom modifications only in /_custom/custom-style.css
#3
Thanks for the reply Florian! I am pretty new at Drupal, so trying to figure out how I would create a new block with a class attached to it. I tried to just add a block with a div and class attached but then it got wrapped in another div upon output of the site so it rendered on the finished page as a div with icon but within another div. How would I go about doing this in a better way? Thanks for your help!!!
#4
You can use an existing block or you can create a new one from admin/blocks ... Then look for its id/class. For example, I have created a new block for contact (look at boaz.ro) and then I have put a png32 transparent image using the below code in custom-style.css:
#block-block-2 .block-icon {background: transparent url(../images/contact_48.png) no-repeat;
}
#5
that all makes sense... except, how do I know what the block div will be titled so I can hook it in the css? Do they go sequentially by how they were created? In your case, how did you know to name the css rule #block-block-2 .block-icon?
Sorry if this is a dumb question, just trying to get the hang of it, and I love your theme! Thanks so much!
#6
Create the block and then look in the page source.... or mouse over "configuration" of the respective block and look at brower's status bar ... it looks like /admin/build/block/configure/block/2, where 2 is the block number.
#7
After implementation of this theme, I moved around a few blocks. For some darn reason, my search icon in the left sidebar (though it fails to show up in any bar both in 32x32 and 48x48) failed to show up after a day or so (could've happened after cron?), which I found odd. No changes in block css or in the icon name, and no other icons are affected whatsoever. Anyone have any ideas?
Clearing cache does not seem to fix the issue.
#8
I tried adding my own but it doesn't work somehow. I'm using the module nice-menus. Did I somehow misunderstand/typo? :)
.block-nice_menus-2 .block-icon {background: transparent url(../images/icons/blocks/icon_06_32.png) no-repeat;
}