As per author's note - "please comment if useful", I could have done with it a couple of months ago!

I ended up putting custom tags into the block title and loads of PHP in the ultimately unreadable block.tpl.php to cope with the various types of block. Something like this should be in core IMHO - you can have node types each with their own template, or you can distinguish nodes by taxonomy term (and do some trickery in template.php), but we need similar for blocks.

Comments

treksler’s picture

very useful indeed
i didn't go as far as making separate tpl.php files

i just modified the block.tpl.php file to add another class to the block based on the name of the custom_theme

eg add this to the beginning

// Support for bustom themes per block via the "Block Theme" Module
if (module_exists('blocktheme')) {
  $custom_theme = blocktheme_get_theme($block);
}

and then change one line to also include the $custom theme

    echo '<div class="block block-'. $block->module .' '. $custom_theme .'" id="block-'. $block->module .'-'. $block->delta .'">';
JacobSingh’s picture

Status: Active » Closed (fixed)

Cool! Great to hear. I'm glad someone is making use of it. If you care to, please try to improve the documentation / suggest some features.

Best,
Jacob