This project is not covered by Drupal’s security advisory policy.
The Block in block module allows you to insert any block into another block, or node body, within the same theme and region (the "target block"). Any string within the target block, like a paragraph tag, can be used to identify where to insert the block. A method is provided to define which occurrence(s) of the string to insert at, and whether to insert it before the string, after it, or to replace it entirely.
Features
- Insert any type of block into any other type of block, including the body of a node.
- When inserting into the body of a node, limit which node types and view modes that the block will be inserted into.
- Use any string within the target block to identify where to insert.
- Choose whether to replace the string with the block, insert the block above the string, or below it.
- Define which occurrence(s) of the string to insert at using integers, "nth-occurrence" expressions (similar to CSS's :nth-of-type), and/or a negation operator (!) for exceptions. For example:
- 1: first occurrence.
- -1: last occurrence.
- 3n+1: the first occurrence then every three thereafter.
- 3n+1,-1: the first occurrence then every three thereafter, plus the last occurrence.
- 3n+1,-1,!-2: the first occurrence then every three thereafter, plus the last occurrence, but never the second-to-last one.
Requirements
Similar projects and how they are different
-
Insert Block: With Insert Block, you place
[block:name of module=delta of block]within the body of a node, and it is replaced with the rendered content of that block. - Block Inject: With Block inject you create regions that are added in the "middle" paragraph (or offset from the middle) of chosen node-types, and place blocks within those regions. The regions can only be added to nodes, only relative to paragraph tags (must be at least two paragraphs), and a block can only be added to one node-region.
Project information
- Project categories: Content display
19 sites report using this module
- Created by Ben Greenberg on , updated
This project is not covered by the security advisory policy.
Use at your own risk! It may have publicly disclosed vulnerabilities.

