Page History
HTML Wrap | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
Related topics: |
This page describes definition properties and template definition properties of a block
, a component-like content element provided by the Content editor module.
Table of Contents |
---|
Overview
...
Block content is stored using the mgnl:block
node type in the JCR. mgnl:block
is similar to the custom node type mgnl:content
, but it cannot be versioned on its own. Block content is usually grouped into block compositions (mgnl:composition
), which are versionable.
...
You define blocks to add or modify content in the Stories app or in an implementation of the Content editor. To render the block content, you must then define a template definition and a script for the block. You can define them both using YAML configuration files or JCR nodes.
Hide block | ||
---|---|---|
|
...
Code Block |
---|
my-module ├── blocks │ └── quotation.yaml ├── i18n │ └── my-module_en.properties └── templates └── blocks ├── quotation.ftl └── quotation.yaml |
See Module configuration - Location of configuration items for a broader explanation of the location of definition files.
...
class | required The fully-qualified class name for the Java bean representing the definition of the block. Needs to be a subtype of The default implementation of For blocks wrapping one or multiple form fields, there is a built-in |
| optional ( A default value is already a part of the definition, so there's in fact no need to specify it in the definition YAML file.) The fully-qualified class name for the Java bean representing the block. Needs to be a subtype of |
templateId | required The ID of the template definition in |
fields | required only for the Defines what field types are available in the block. |
icon | optional, default is icon-help-mark Defines the icon used by the Block chooser toolbar. |
name | optional A custom i18n base name used by the By default the block's name in the JCR is used. |
label | optional An i18n label for the block, for example the value |
...
You can use the following properties in a block template definition:
renderType | required The renderer to be used. |
| required Path to the template script in the |
...