I've created some custom blocks in my development environment and export them with Features + FE Block with given machine names. And then deploy and enable them in my staging environment.

Just like the sample below, the blocks with same machine name have different block ids in different environments, but I want the guide block has a special layout than other blocks.

    block-block-1 (guide)
    block-block-2 (case_links)

    block-block-1 (case_links)
    block-block-2 (guide)

Because in different environments the guide block has different block_id, I can't just use the block id as the identifier to apply these css rules.

What should I do to solve this problem?

1 Answer 1


You can add custom classes or id's to your blocks. If you don't feel to code it yourself your best bet would be to use the Block class module, and perhaps also along with the Block Class Styles module which provides custom templates for your blocks.


The new version (7.x-2.0) of Block Class module has just changed it database structure, removed the block_class table and add a field css_class into block table. The current version of Block Class Styles module work well with Block Class 7.x-1.2.

  • Thanks, just follow your answer, I find that the Block class module has just release a new version 7.x-2.0 in which changed the database table structure (removed block_class table, add a css_class field in block table), so I can use FE Blocks exports blocks' css classes. But the newest version of Block Class Styles module doesn't work well with the 7.x-2.0 without any code change. I modify the code, and it just work OK now. Commented Mar 19, 2013 at 10:48
  • Thanks for the update. Glad to know it worked out for you.
    – dxc
    Commented Mar 19, 2013 at 17:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.