Control development
In Bildy a control is a single content field type that can be added to a data model. The way Bildy is structured makes it fairly simple and convenient to create new types of controls. It is not a task for beginners, but for experienced JS and PHP programmers it is very flexible and powerful way to create different types of content management fields. Imagination is the biggest limit.
We are working on control development documentation and will publish it as soon as possible.
A brief explanation of how Bildy controls are structured:
The Bildy editor portion
- control.xml describes the control and provides documentation
- control.js contains a MooTools style class with information needed to create the control in database table and the behavior of the control in Bildy editor. The sqlfields property in the class is also required by Bildy Engine, so this file is required when running a Bildy site.
- icon.png is the icon that's shown next to the control in data model view of Bildy editor
- input_settings.html contains the settings of the control that are accessible through the Bildy editor in data model view
- input.html contains the markup that represents the control in content editor in Bildy
The Bildy Engine portion
- control.php gives additional control to the control when it's used on the web site, such as formatting input from Bildy forms and Bildy editor, formatting output to web site and form validation
- output.php is optional and formats the output of control on the web site. Without output.php the data is output to the web site as it is in the database table
- webinput.php contains what's needed by Bildy to render the control in a Bildy form on the web site
A control may also contain any number of other files, but these files have a defined special function in Bildy.
To create a control properly you will have to wait for the documentation, but feel free to check out and experiment with the controls made by us. You can create a new control by just copying a control folder and renaming it. Don't forget to modify control.xml, control.js and conrol.php to avoid conflicts between controls.