Create and manage Concrete CMS block types. Use this skill when the user asks to create or modify custom block types.
Installation
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Create and manage Concrete CMS block types. Use this skill when the user asks to create or modify custom block types.
Building Block Types
Block types are the fundamental units of content in Concrete CMS. They allow users to add different types of content (text, images, forms, etc.) to pages.
Basic Workflow for Block Type Development
Define the Block Type Directory:
If in a package: packages/your_package/blocks/block_handle/
If in application: application/blocks/block_handle/
Create the Controller:
Create controller.php in the block directory.
Create the View:
Create view.php for the public output.
Create Add/Edit Forms:
Create add.php and edit.php for the dashboard interface.
These files typically include form.php: <?php $this->inc('form.php'); ?>
Do not forget these files, as they are required for the block to be added or edited in the CMS.
Create the Form Template:
Create form.php which is shared by both add.php and edit.php.
Define Database Schema:
Create db.xml (Doctrine XML format) to define the block's data table.
Refer to the working-with-database skill for the XML format.
Register the Block Type:
Install via Dashboard or programmatically in a package install() method.