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/
- If in a package:
- Create the Controller:
- Create
controller.phpin the block directory.
- Create
- Create the View:
- Create
view.phpfor the public output.
- Create
- Create Add/Edit Forms:
- Create
add.phpandedit.phpfor the dashboard interface.
- Create
- Define Database Schema:
- Create
db.xml(Doctrine XML format) to define the block's data table. - Refer to the
working-with-databaseskill for the XML format.
- Create
- Register the Block Type:
- Install via Dashboard or programmatically in a package
install()method.
- Install via Dashboard or programmatically in a package
Reference Documentation
- Form Widgets (Page/File Selector, Combo Box)
- Custom Pagination with Pagerfanta
Converted and distributed by TomeVault — claim your Tome and manage your conversions.