Workshop

Creating Tools


Chisel works by allowing field types to be combined to create powerful editing tools. There are 3 different types of tools. The first step is deciding which one most suitable for your application.

  • Blocks - Standard Concrete5 blocks. Learn More.
  • Catalogs - Dashboard pages that support large amounts of data. Learn more.
  • Settings Pages - Simple admin panel for collecting miscellaneous data. Learn more.

 

Basic Settings

After deciding which tool type to use, some basic settings will need to be filled out.

 

Page Path: This option is only available for catalogs and settings pages. This designates where in the dashboard your page will be created. If pieces of your path do not exist, dummy pages will automatically be created to complete the path. This is handy for grouping multiple related catalog/settings pages under one section. Name: This will be the name of your block, or the name of your dashboard page. Model Name: This will be the name of the model class that is generated for pulling your data. It will autopoulate based on the name but can be customized if so desired.



Adding fields

Once the tool's foundation has been defined, it is time to start building the schema. Click the 'Add Field' button to add field rows. Each field row will have it's own set of options for defining it's functionality.



Label: This is what will be displayed next the field and is key in letting the user know what data to provide. The label will be used to automatically generate the handle for the field (the handle can be customized if so desired). Field Type: The field type option determines what kind of data will be collected as well as the input display on the admin panel. There are many different field type options, some of which have additional options. For examples of all field types, click here. Required: (Optional) This determined whether the field is required to be populated in order to save the form. Field Note: (Optional) Field notes are descriptive notes that will appear above your field in your admin panel. Useful for explaining what the field is for. Database Options: The database options panel will be automatically populated based on the field label as well as the field type that were chosen. Advanced users may choose to alter these settings.

 

Once you have completed all of the necessary fields for your application, click the 'Save' button. This will create all of the files necessary to build the tool as well as install it.



Updating Created Tools


Schemas

Many times we discover that we need to capture additional field types after the tool has already been created. Chisel has a way of handling this without having to start from scratch. Every time a tool is created, a schema file is generated. The schema is a blueprint of your tool and can be loaded into the workshop in order to make alterations.

In the toolbar near the bottom of the Workshop is a 'Load Schema' menu that will be populated with a list of schemas that are available. Select the tool you wish to modify and the page will reload with all of the field options set.

 

Overwriting Files

After making modifications to a loaded schema, a decision will need to be made on which files you would like to overwrite during the update process. Chisel was designed with the idea that a developer may want to add custom code to the files it generates (especially in a block's view file). In order to prevent losing any custom code added, 4 overwrite options available that will let you decide which file groups to overwrite.

Here is a breakdown of what files will be overwritten with each option:

None Selected Saving a loaded schema with no files being overwritten will still update the database tables associated with the tool. Edit Forms Edit forms consist of the admin panel files that contain the actual forms for filling out. In the case of blocks, this is the edit.php file as well as the files in the folder in the block's directory named after the tool. In the case of catalogs and settings pages, these are the files that reside in the single_page directory. Views Overwriting views only has an effect on blocks. This will update the view.php file that resides in the block's folder. This is the file that is most likely to have custom code added to it. Controllers: In the case of blocks, this will overwrite the controller.php file in the block's directory. In the case of catalogs and single pages, this will overwrite the files that reside in the controllers directory. Models: In the case of blocks, this will overwrite the files within the models folder of your block's directory. In the case of single pages and controllers, this will overwrite the files named after your tool in the application/src/Models directory.