agentsclimarketplace

Building blocktypes

Skill MacareuxDigital/concretecms-skills/building-blocktypes

Agent Skills for Concrete CMS

Install
npx -y skills add MacareuxDigital/concretecms-skills --skill building-blocktypes

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 9 stars9 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Create and manage Concrete CMS block types. Use this skill when the user asks to create or modify custom block types.

SKILL.md

1.5 KB, as published. Nobody here has run it

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

  1. Define the Block Type Directory:
    • If in a package: packages/your_package/blocks/block_handle/
    • If in application: application/blocks/block_handle/
  2. Create the Controller:
    • Create controller.php in the block directory.
  3. Create the View:
    • Create view.php for the public output.
  4. 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.
  5. Create the Form Template:
    • Create form.php which is shared by both add.php and edit.php.
  6. 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.
  7. Register the Block Type:
    • Install via Dashboard or programmatically in a package install() method.

Reference Documentation

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.