SMT custom content types use NetSuite’s Custom Records and Fields for defining the settings and values required for the custom content type. For example, if you have a custom content type that displays an image with a text overlay, you must create a custom record for the content type and then create the custom fields for the values required by your content. In the following screen shot you see the custom record for the SC CCT ImageViewer. As part of implementing a CCT you associate this custom record with a corresponding CMS Content Type Record. See CMS Content Type Record for more information.
The Access Type for the custom record must be set to No Permission Required.
Custom Fields for Custom Content Type
After you create the custom record, the next step is to define the custom fields. The custom fields you define here are displayed in the side panel in Site Management Tools when you add the custom content type to a page. In this example, the custom fields are used to define the information that is displayed by the custom content type. These fields include:
Message — A text area that lets you enter text to overlay on the image.
Vertical Align — Lets you select the vertical alignment for the text. Notice that in this example, the Vertical Align field is defined as a list/record type, and is associated with a custom list.
URL — Identifies the source for the image.
To reference the custom fields in your CCT module, use the ID assigned to each custom field. In this example, the IDs for custom fields are:
custrecord_sc_cct_iv_text — Message field
custrecord_sc_cct_iv_valign — Vertical Align field
custrecord_sc_cct_iv_imageurl — URL field
Custom content types do not support the Password field type.
After your custom content type is fully implemented, it is displayed in SMT. The following screenshot illustrates the SC CCT ImageViewer custom content type.
A Custom Content Type is available in SMT only after you have completed all implementation steps.
Tabs for Custom Content Type
Depending upon your custom content type and the number, type, or function of fields, you may want to create tabs to organize the fields. You can create tabs in the custom record for your custom content type and assign fields to the tabs. The tabs and field organization are reflected in the custom content types settings in the side panel in SMT.
For more information on custom records and fields, see the help topic Custom Records.
Custom Content Type Records
Each time you use SMT to add an instance of a Custom Content Type to your site, a CMS content record and a custom record for the Custom Content Type is created. The CMS content record determines how and where the custom content is displayed, see CMS Contents Record. The custom record for the content type stores the values for the custom content elements. In the example of the ImageViewer custom content type, these values include:
Although you can view or edit instances of the Custom Content Types in NetSuite, best practice is to make your changes to the Custom Content Type in SMT.
To view a Custom Content Type Record in NetSuite:
Go to Customizations > Lists, Records, & Fields > Record Types.
In the Record Types list, locate the record for your Custom Content Type and click List.
This displays a listing of all instances of that Custom Content Type.
Parent Child Record Associations
This information refers to SuiteCommerce or the 2019.2 release of SuiteCommerce Advanced or later.
By using parent-child record associations you can create more complex data sets in your custom content types. For example, you create a Custom Record Type named blog. Next, you create a new CMS Page Type named blog. Finally, you use the Custom Record Type dropdown menu to select which record type you want to associate to your page type.
Using this method to create new page types provides you with many options including the abilities to apply specific templates to your page type, add headers or footers, and many other options.
You must use SuiteScript or NetSuite to add, edit, or delete the custom records. Site Management Tools manages only the page types you have associated to the custom record. SMT lets you manage the fields created in your custom record. When you create a new page in SMT, the pop out menu renders your custom fields when you click Landing Page and you can manage the content in your fields there.