Site Management Tools (SMT) administrators can use page types to add a range of pages and layouts to a website. When SMT administrators create new pages in SMT, they assign them to a certain page type. This can be the default landing page or any newly provided page type via an extension. SMT administrators can also modify the layout of existing pages. When SMT admins change an existing core page, they generate an enhanced page and can choose from a set of layout options defined by the extension.
However, in order for these elements to be available in SMT, extension developers must first create an extension that uses the Extensibility API to register page types and templates.
The instructions below describe how to configure a Commerce extension to:
In NetSuite, create a new CMS Page Type record.
When generating new pages for a Commerce website using SMT, register new page types to be available.
Create templates and use them to define either the default layout for a page type or alternative layout alternatives.
| Step | Description |
|---|---|
| 1 | Set up your extension to create a new CMS Page Type record in NetSuite. This requires manually editing your extension’s manifest.json file.During testing and development, you need to create this CMS Page Type record manually.NoteYour extension automatically creates the CMS Page Type record when it is installed into an account from a bundle. During early testing, however, your extension is not yet part of a bundle, so you must manually create it. |
| 2 | Create a view for your new page type.This JavaScript file is essential to render the instance of the page type. This file must extend PageType.Base.View.js. |
| 3 | Create a template to act as the default layout for your registered page type. |
| 4 | Register your new page type using the Extensibility API. |
| 5 | Register alternative layouts using the Extensibility API.Every page type includes a default layout. However, you can register other templates to be available as alternative layout options for a new or existing page types. |
| 6 | Create template thumbnails as assets.Each template file corresponds to a different layout option, selectable in SMT when creating a new page. Each template includes a thumbnail preview image that you include with the extension. |
| 7 | Deploy your changes.You can test your extension on a local server. However, you must first deploy your extension files to your account and activate the extension on a domain to test the functionality in SMT.ImportantYou must activate the extension before any deployed changes take effect. |
| 8 | Log into SMT and use the Layout Selector when creating a new page or editing an enhanced page. |