Skip to content

backdrop-contrib/current_content_display_block

Repository files navigation

Current Content Display Block

Current Content Display Block displays a selected display mode of the current content item. A content item could be any type of entity, such as a node, a user, or a custom entity.

Comparison with other similar solutions

  • Existing content block (Core)

    • Existing content block allows you to select a fixed node, either by ID or title and is limited to nodes. You can select the display mode.
    • This module uses the current node (or other entity) to determine what to show so you can split fields across multiple regions by hiding fields in one display mode and showing them in another. This block allows you to select the display mode and then shows those fields.
  • Field blocks (Core)

    • Field blocks work on the current node (or other fieldable entity) and allow you to place individual fields in different regions. This offers a granular approach where fields can use different formatters on differing layouts, but you also need to configure each time you place in a layout.
    • This module also works on the current node (or other entity) but works at the display mode level (e.g. admin/structure/types/manage/page/display). You could hide fields in the default display mode and create a new display mode called 'Sidebar' where you place those fields. Different content types could have different fields in the 'Sidebar' display mode and placing once in the layout would work for all content types.
  • Views block (Core)

    • Views blocks can have a context of the current node (or other entity) and display selected fields in a wide variety of different ways. There is a lot of possibilities for configuration, but it can also be difficult for new users to get the solution they want.

Installation

Example Usage

Nodes

  1. Hide the fields you want to place elsewhere in the default or full display modes in the content type (or types) you are working with.
  2. Create a new display mode called 'Sidebar' and hide fields from the default/ full display mode and show the others. Do this for each content type you are working with.
  3. Ensure you are working with a layout that has the node/% context you need.
  4. Add a Current Content Display Block to the sidebar region and select the sidebar display mode.

Users

  1. Hide the fields you want to place elsewhere in the default or User Account display modes in the User field management display screens (admin/config/people/manage/display).
  2. Create a new display mode called 'Sidebar' and hide fields from the default/ User Account display mode and show the others.
  3. Ensure you are working with a layout that has the user/% context you need. You can easily create one at admin/config/people/manage/layouts if you don't already have one.
  4. Add a Current Content Display Block to the sidebar region and select the sidebar display mode.

Issues

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

Current Maintainers

Credits

License

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

About

Select a display mode of the current node, user or other entity to display in a block on your Backdrop CMS website.

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages