Creating Custom Presets?

5 posts by 4 authors in: Forums > CMS Builder
Last Post: November 16, 2009   (RSS)

By (Deleted User) - November 4, 2009

If we wanted to how do create our own Custom Presets?

Re: [hegadmin] Creating Custom Presets?

By Luke - November 4, 2009

Hi hegadmin,

To create a CMS Builder preset do the following:

1. Log into CMS Builder and create a new section editor (Admin -> Section Editors -> Add New Editor). For this example we'll create a new Multi Record editor and enter in Articles as the Menu and Table Name. Click "Create New Menu".

2. Modify your new "Articles" section editor and add new fields as you see fit.

3. When done, on your server go to /cmsAdmin/data/schema folder and copy over your articles.ini.php file to your /cmsAdmin/data/schemaPresets folder. (Make sure you copy the schema file and not move it or else your initial table will disappear).

4. For new CMS Builder installations you can simply place the articles.ini.php file in the /cmsAdmin/data/schemaPresets folder and when creating a new section editor select "Articles" from the "select presets" drop down.

I hope this helps. If you have any questions please let me know.
Luke Holzken
Product Development

Re: [LeQueb] Creating Custom Presets?

By Dave - November 16, 2009

Hi LeQueb,

There's no user documentation for the fieldnames used in the schema datafiles.

That said, you can find a list of the fields and their default values in the php code at the top of /cmsAdmin/lib/menus/database/editField_functions.php

You can specify custom mysql column types through CMSB under: Admin > Section Editors > Your Section > Field Editor > Your Field > Advanced Options > MySQL Column Type

And this gets saved in the schema data file like this:
customColumnType = "INT"

And everything is hardcoded to use the 'num' fieldname as the default id field and have it be auto_increment.

Hope that helps! Let me know if you have any other questions. :)
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Creating Custom Presets?

By (Deleted User) - November 16, 2009

Ok perfect, so i build my tables in CMS Builder and retrieve the out .ini file in /data/schema/MY FILE.ini.php. Very nice and simple, thanx.