Need some help with your project? Contact me

5 cool modules to help you with your blocks

I put together this article to share with you 5 modules that I found are useful when dealing with blocks in Drupal 7. From block management to enhanced functionality, these modules have some pretty nifty features that you should probably be aware exist.

Block Class

Block Class is a very simple module that allows you to add custom classes to your blocks. When you add a new block or edit an existing one, you can specify a class (or multiple classes) that will be added to the other generic block classes of that particular block.

I know what you are thinking, it’s not so difficult to write a module that adds custom classes to your blocks. But guess what? You don’t have to write it cause it’s already there.

So do check it out.

Image Block

Another simple module, Image Block makes it easy and fast to put an image in a block. It provides a special type of block you can add in the administration that contains an image field in addition to the regular block content fields like the title, description and body.

You can upload an image, specify the alt and title tags for the image and even add a link behind it. More importantly, you can specify what image style the image should use. And I don’t have to tell you that this integration opens up further possibilities.

So definitely check it out.

Block Group

More on the block management side of things, Block Group provides a nifty functionality to group your blocks into custom admin created regions.

In the block administration, you can add a new block group. That creates a new block and a special region for it. Then like normally you can add other blocks to that region in order to make them part of the group. And if you want to move them all at once, you can just move the block group that you just created.

It’s pretty cool, so check it out.

Block Context

Block Context is a pretty interesting module for managing your blocks on the administration page. There are two main features to it: filtering blocks based on three types of contexts in which they appear (path, note type and role) and quickly assigning contexts without having to go into the block configuration itself. And that is pretty handy indeed if you deal with many blocks.

One drawback to shortcutting the assignment of these contexts is that you can only do it with preexisting ones. For instance, if I have a block that only shows on node/1, then I can use this shortcut to make it that other blocks are visible only on node/1 as well. But I cannot add other paths if they haven’t already been declared in the configuration of at least one block.

But all in all, pretty handy so check it out.

Accordion Blocks

The last module I am going to mention here is Accordion Blocks. This is a pretty useful module if you are into the accordion type of effects. The way it works is that you add an accordion block (if you go to admin/structure/accordion_block) to which you can add a number of existing blocks from your site.

When you save the accordion block, a new block is created on your site available as usual. This will display the blocks you added earlier with the accordion effect. So this is also worth checking out.

Conclusion

So there you have it. 5 modules that you may or may not have heard about but that definitely can provide an added value to your site.

Hope this helps.

Add new comment

You can post comments in Markdown and basic HTML tags.
For code blocks, wrap your code within '~~~'. For example:
~~~
$var = 'my variable';
~~~