Skip to content

Allows a block to be displayed as the content of a field on your Backdrop CMS website.

License

Notifications You must be signed in to change notification settings

backdrop-contrib/blockreference

Repository files navigation

Block Reference

Defines a field type Block reference which creates a relationship to a block and allows the block to be displayed as the content of the field.

Installation

  • Install this module using the official Backdrop CMS instructions at https://backdropcms.org/guide/modules

  • Create a new blockreference field on any fieldable entity (node, taxonomy_term, etc.)

Theming

To assist in theming blocks that are displayed using the block reference module, the block reference element is available in the $variables array in template_preprocess_block().

The element can be found at:

$variables['elements']['#blockreference_element']

Note that the element will not be there for non-blockreference blocks so you should first check the existence of the element before using its contents.

Notes

  • Relationships are saved using the block's delta + module.

Issues

Bugs and Feature requests should be reported in the Issue Queue: https://github.com/backdrop-contrib/blockreference/issues

Current Maintainers

Credits

License

This project is GPL v2 software. See the LICENSE.txt file in this directory for complete text.