Create a Custom Content Type
As an extension developer, you can create Site Management Tools (SMT) custom content types (CCT) to provide custom website applications or features that website administrators can enable and manage through the SMT user interface. As a best practice, you should build your CCT as an extension using the extension developer tools.
In this tutorial, follow the steps in each listed procedure to develop a CCT named SC.CCT.ImageViewer. This CCT introduces a simple image viewer that retrieves data from either a custom record (as set up in SMT) or from certain data previously made available in the browser.
Implementing CCTs for your SuiteCommerce website requires two separate, but related activities:
-
Create a CCT as an extension for SuiteCommerce. You must first create an extension with a CCT to contain the JavaScript, HTML, Sass, and other resources required. See the checklist below for guided steps.
-
Set up custom records in NetSuite for your CCT using SMT. This requires creating the custom records, fields, and content type record for your custom content type, and then enabling the CCT in SMT.
Follow these steps to implement a CCT as an extension for your SuiteCommerce site.
Step |
Description |
---|---|
Use the extension development tools to create a baseline extension that includes a baseline module and then add a CCT baseline module as a separate module. |
|
Create the entry point JavaScript files that are necessary to mount the extension to the application. |
|
Define what the CCT loads when it is dragged into the application. |
|
Create the template file required to render the data defined by the view. |
|
Use the Sass files auto-generated by the extension development tools to style the HTML defined by the template file. |
|
Test and deploy the extension. |
You must also set up your custom records in NetSuite for your custom content type using SMT. To do this, follow the instructions in Site Management Tools Custom Content Type.
You must have SMT enabled in your NetSuite account to implement CCTs. See Site Management Tools for information on how to set up SMT.