Customize specific blocks

In your themes block.tpl.php you can add a litle script that converts the title to a class to the wrapping div tag. First add the following in a php section:

<?php
$block_class_title
= 'block-'.strtolower(str_replace(" ", "-", $block->subject));
?>

It will convert "My Title" to "block-my-title".

Then add a print in the first div tags class section in block.tpl.php

<?php
<?php print $block_class_title; ?>

?>

This is how it could look like:

<?php
...
<
div id="block-<?php print $block->module . '-' . $block->delta; ?>
" class="<?php print $classes; ?> <?php print $block_class_title; ?>"><div class="block-inner">
...
?>
Knowledge keywords: