Content Blocks Configuration

Overview

You can add and configure the Content Blocks plugin in your project using Essentials.

Prerequisites

Configuration Steps

  1. In Essentials, add the Content Blocks feature to your project.
    Essentials Content Blocks feature card with Install feature button
  2. Rebuild and restart your project.
  3. In Essentials, locate Content Blocks under Installed features and select Configure.
    Essentials Content Blocks feature panel with Configure button
  4. Choose the document type where you want to add content block fields.
    Content Blocks configuration screen with document type dropdown
  5. To add a new content blocks field, click Add and configure the following parameters:
    1. Field name: The label displayed above the field in the CMS Document Editor.
    2. Picker type (links or dropdown): Determines whether the UI presents content block options as links or in a dropdown.
    3. Max Blocks: The maximum number of blocks allowed in the field. Leave empty for no limit.
    4. Used Compounds: Select two or more from the available compound types.
      Content Blocks configuration screen with used compounds dropdown open
    5. Save your changes.

Note: The Beanwriter tool in the setup application does not generate getters for content blocks fields. You must manually add a getter method for each content blocks field in the content bean. For details, see Content Blocks and Delivery Tier.

Advanced Configuration

You can configure additional options for content blocks fields using JCR properties in the CMS Console.

Configuration properties are stored at:

/hippo:namespaces/[project_name]/[document_type]/editor:templates/_default_/[content_blocks_field]/cluster.options

For example, in a project named myproject with a document type contentdocument and a content blocks field blocks, the node path is:

/hippo:namespaces/myproject/contentdocument/editor:templates/_default_/blocks/cluster.options

Display Block Type Names

You can display the name of each block's compound type above the content block in the editor.

Content blocks editor showing labeled Link and Image Link blocks

To enable this feature, add the boolean property showCompoundNames with the value true to the cluster.options node:

/hippo:namespaces/myproject/contentdocument/editor:templates/_default_/blocks/cluster.options: showCompoundNames: true

Additional Block Name Configuration

Info: These options are available in brXM 15.5.0 and later.

Starting with version 15.5.0, block names can be collapsed. The following properties are available for configuration in the Content application only, and only when showCompoundNames is set to true:

/hippo:namespaces/myproject/contentdocument/editor:templates/_default_/blocks/cluster.options: showCompoundNames: true startCollapsed: true showTitles: true titleMapping: ['myproject:mycompound=myproject:title', 'myproject:myothercompound=myproject:summary'] compoundNamesMaxLength: 90
Property nameProperty typeDescription
startCollapsedBooleanIf set to true, blocks are collapsed by default when a document opens.
showTitlesBooleanIf set to true, a part of the block's content is shown in the block name for easier identification when collapsed. Uses titleMapping to determine the property to display.
titleMappingmultiple StringMaps compound type to property name. Used to determine which property to display as the title when showTitles is true.
compoundNamesMaxLengthLongSets the maximum length for a block name. The default is 90. If the name exceeds this length (especially when showTitles is true), it is truncated and an ellipsis is added.
Share Feedback
Page: /build/plugins/content-blocks/configuration
Section: Build
Category *