Create Custom Content Types for an Extension

When you create your baseline extension files, the developer tools provide a method to build your extension as a CCT. The developer tools provide on-screen instructions to assist you with developing your CCT. This requires:

Note:

To implement a CCT using Site Management Tools, you must configure the CMS Adapter Version to 3 in the SuiteCommerce Configuration record. This property is located in the Integrations tab and Site Management Tools subtab.

To add a CCT to your baseline extension:

After you have successfully created your baseline CCT, you must set it up for use with Site Management Tools and customize your code to meet your needs as described in To Build a CCT:.

  1. Open a command line or terminal.

  2. Access the top-level extension development directory you created when you installed the extension developer tools.

  3. Create a baseline extension, if you have not done so already. See Create a Baseline Extension for details.

  4. Enter the following command:

    gulp extension:create-cct

  5. When prompted, enter the following information:

    Important:

    Unless otherwise directed, create all entries using only alphanumeric characters without spaces.

    Set the Label of the CCT

    Name the CCT to be added to your baseline extension. This can contain alphanumeric and special characters.

    Set the Name of the CCT

    Provide a name for your CCT as it appears in your development files and folders. Use only alphanumeric characters without spaces.

    Set a Description for your CCT

    Provide some text to describe your CCT.

    For This CCT You Will Be Using

    Select one or more file types your CCT requires (Templates, Sass, Configuration, JavaScript, SuiteScript). An asterisk (*) identifies a selected application.

    Select Extension to Add CCT

    Select the name of the extension to contain this module. This option only appears if your Workspace directory contains more than one extension.

  6. Repeat these steps to add any additional CCTs as needed.

To Build a CCT:

  1. Open the extension’s manifest.json file. This can be found in Workspace/<EXTENSION_DIRECTORY>/.

    This file lists the following as part of the manifest metadata. You need this information when setting up your records in NetSuite.

    icon

    Equals a default icon that is visible in SMT Admin. As a default, the developer tools provide one to help you get started.

    settings_record

    Equals the ID of the custom record you associate with this CCT.

    registercct_id

    Equals the Name field of the CMS Content Type Record for your CCT. This is also the value of the id property within the registerCustomContentType() method of your CCT module’s entry point JavaScript file.

  2. Prepare your CCT for use with SMT.

    Follow the instructions listed in the help topic Custom Content Type. Build your custom record and your CMS Content Type Record using the parameters explained in Step 1.

  3. Develop your CCT module.

    Follow the instructions listed in the help topic Create a Custom Content Type. Ensure that your entry point JavaScript file incorporates your CMS Content Type record name, as described in Step 1.

  4. Deploy and activate your extension. Then log into SMT to test confirm that your CCT was added correctly. See Site Management Tools for details on using SMT.

Related Topics

Extensions for Site Management Tools (SMT)
Create Page Types
Register Page Types and Templates for SMT

General Notices