Main
Index
Search
Posts
Who's
Online
Log
In

Home: Products: CMS Builder:
Creating Custom Presets?

 

 


hegadmin
User

Nov 4, 2009, 10:43 AM

Post #1 of 5 (3949 views)
Shortcut
Creating Custom Presets? Can't Post

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


Luke
Staff


Nov 4, 2009, 11:58 AM

Post #2 of 5 (3933 views)
Shortcut
Re: [hegadmin] Creating Custom Presets? [In reply to] Can't Post

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


LeQueb
Novice

Nov 14, 2009, 10:56 AM

Post #3 of 5 (3835 views)
Shortcut
Re: [Luke] Creating Custom Presets? [In reply to] Can't Post

@Luke

By the ability to add preset is very nice and i will be using it a lot, but i have a question about it:

what are the options when creating a field in the preset. For example:


Code
[userID] 
order = 7
label = "User ID"
type = "textfield"
defaultValue = ""
description = ""
fieldWidth = ""
isPasswordField = 0
isRequired = 1
isUnique = 1
minLength = ""
maxLength = ""
charsetRule = ""
charset = ""


How would i make this field an integer field with a particular length and making it an auto_increment?

I guest the real question is, do you have a list of all the options available to create a field in a preset?

Cheers!


Dave
Staff / Moderator


Nov 16, 2009, 10:00 AM

Post #4 of 5 (3782 views)
Shortcut
Re: [LeQueb] Creating Custom Presets? [In reply to] Can't Post

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
 


LeQueb
Novice

Nov 16, 2009, 10:10 AM

Post #5 of 5 (3778 views)
Shortcut
Re: [Dave] Creating Custom Presets? [In reply to] Can't Post

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.