CSS Classify

nick_robillard - April 22, 2009 - 22:54

CSS Classify is a module that adds an extra class to block module blocks based off the block description. Yes there are several other modules out there that do something similar.

Here are a few advantages of Classify over other "classy" modules:

  1. No need to populate a separate field (since block descriptions are required)
  2. No need to manually add a PHP snippet into block.tpl.php
  3. Better performance - no need for a new db table. No new data is stored. Descriptions are retrieved from {boxes} using block module's block_box_get()

Yes this only affects block module defined blocks, but as a themer, it's block blocks that are most apt to have id's changed (typically when moving updates from a dev server to a live server). Custom module blocks are typically least likely to have their deltas changed.

* Provisions have been made for Multiblock. If a block is a Multiblock instance, the class name is based off of the Multiblock table data instead of {boxes}.

Releases



 
 

Drupal is a registered trademark of Dries Buytaert.