Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: Views Bootstrap 5.5.4 — Minor update available for module views_bootstrap (5.5.4). Release: Rightup theme 1.0.3 — Minor update available for theme vartheme_bs5_rightup (1.0.3). Release: CommentOn 1.0.6 — Minor update available for module commenton (1.0.6). Release: ChatGPT Ads 1.0.3 — Minor update available for module chatgpt_ads (1.0.3). Release: Opensolr Search 5.1.3 — Minor update available for module opensolr_search (5.1.3). Release: ServiceM8 Webform Integration 1.2.1 — Minor update available for module servicem8_webform (1.2.1). Release: PostfixAdmin 1.0.0 — Initial release available for module postfix_admin (1.0.0)! Release: ip_analyser 1.0.3 — Minor update available for module ip_analyser (1.0.3). Module Revived: Swagger-PHP OpenAPI 3 documentation generator 1.0.0 — Module swagger_php updated after 10 months of inactivity (1.0.0). Security Coverage: Microsoft Azure AI — Module ai_provider_azure now has official Drupal security advisory coverage.

Box

No security coverage
View on drupal.org

This project allows you to embed a box entity which it provides into another entity using a text filter. Imagine you have a block-like content, which you would like to have embedded in content area of your site. You can just write:

[box:entity_id] or [box:entity_id:view_mode]

and this module will do all the magic, displaying box entity specified by entity ID in a given view mode (defaults to full) in a themeable box and current website language. If you prefer using machine names which (unlike entity IDs) describe box content better, just write:

[box-name:entity_machine_name] or [box-name:entity_machine_name:view_mode]

Box entity has been created for the sole purpose of embedment. It has bundles enabled and one default bundle (Default) created, has no view URL, is revisionable, comes with a node-like per-bundle permissions and carries no extra functionality like nodes (URL aliases, authoring information, ...) or blocks (placement, visibility settings, ...) which are of no use for the purpose of embedding. If user does not have appropriate permission for viewing embedded boxes (View published Box entities / View unpublished Box entities), nothing is displayed. View published Box entities is automatically enabled for both anonymous and authenticated users when module is installed.

Installation and usage:

  1. Install Box module
  2. Enable Insert boxes text filter for desired text formats
  3. (optional) Create new box bundles at Administration -> Structure -> Box types
  4. Create box entities at Administration -> Content -> Boxes
  5. (optional) Override box template to your liking
  6. Embed boxes using text filter:
    by entity ID: [box:entity_id] or [box:entity_id:view_mode]
    by entity machine name: [box-name:entity_machine_name] or [box-name:entity_machine_name:view_mode]

Why would you need a new module if blocks with their wonderful new custom block types seem to be ideally poised to accomplish this task?

You can indeed use Insert Block module and it may work just fine. However using blocks has three major drawbacks which might or might not affect you depending on your use case. For me they merited introduction of a separate module:

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
1
Tracked since
Jul 2024
Latest release
2 years ago
Releases (12 mo)
0
Maintenance
Dormant

Releases

Version Type Core Release date
5.0.x-dev Dev Jul 14, 2024