The plug-in allows the developer to define a set of blocks with a certain markup and a list of fields, so that the content manager uses those blocks that it considers necessary, with its content.
After installation, you must create the configuration files or rename the
*.php.sample files to
*.php. In the administration panel, the plugin adds a new tab to the edit-resource page. To show contents of the blocks use the snippet
The configuration for the blocks is taken from the config folder. To create a new block, you need to create a
<block-name>.php file in this folder, which should return an associative array. To create a container, you need to create a file
container.<container-name>.php. The structure of the array is as follows:
|title||Block name visible to the manager when filling in Value|
|container||Name of the container (or the array of names) in which the block will be displayed.|
Associative array of used fields, in which the keys are field identifiers, and the values are the arrays of options for these fields.
The possible field types and options are listed below.
|show_in_templates||Array of template identifiers for which editing and output of blocks are available|
|hide_in_docs||Array of document identifiers for which editing and output are not available|
An array of document identifiers for which editing and output of blocks are available.
If this parameter is specified, then
If none of the parameters restricting access is specified, the blocks will be available in all documents.
The sort order in the
An associative array containing the template for the
For a description of template creation methods, see below.
The icon class that will be displayed in the
For example, if you set the class
The image that will be displayed in the
The image will be processed with the
|prepare||The name of a snippet or function that will be called before displaying data. For example:
The parameters for the function and the snippet is the same: