This project is not covered by Drupal’s security advisory policy.

block_api.jpg

Allows users to create block instances of predefined block types registered by other modules.

Features

Difference to core blocks:

  • Modules register block "types".
  • Administrators can spawn new instances of a block type.
  • Block instances are entities.
  • Unless a block type opts out, Block API takes over the storage of configuration settings per block instance.

Major ideas and parts for the block instance handling have been based and borrowed from JohnAlbin's excellent Menu block module.

An example API implementation is available in a hidden testing module, which provides the equivalent of custom blocks in core; i.e., a simple title and HTML body.

Block API itself provides no block types on its own.

Upcoming features

There's a hidden Custom block type sub-module under development, which:

  • Allows to create new, administrator-defined custom block types (leveraging Entity API module).
  • Allows to add fields to all registered block types.

The sub-module is not fully implemented yet. If you'd like to use this sub-module in production, please help with development and iron out the remaining issues.

Project Information

Downloads