Create Page Types

Page types let Site Management Tools (SMT) administrators introduce a variety of pages and layouts to a website. When SMT admins create new pages in SMT, they define it as a specific page type. This can be either the default landing page or any newly created page type introduced through an extension. SMT admins can also change the layout of existing pages. When SMT admins edit an existing core page, they create an enhanced page and can select from a list of different layouts, based on the layout options defined by the extension.

However, for these elements to be available in SMT, extension developers must first set up an extension to register page types and templates using the Extensibility API.

Note:

Page types are associated with CMS Page Type records. For more information on these records in NetSuite, see CMS Page Type Record. For more information on creating new pages using SMT, see SMT Page Layout Selector.

The following steps explain how to set up a Commerce extension to:

Note:

These steps assume that you have already started building an extension using the extension developer tools. See Extension Development Steps for a checklist of steps required to build an extension.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         

Step

Description

More Information

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.

Note:

Your 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.

Add a CMS Page Type Record

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.

Create a View to Render a Registered Page Type

3

Create a template to act as the default layout for your registered page type.

Site Management Tools Templates and Areas

4

Register your new page type using the Extensibility API.

Register a Page Type

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.

Register a Template

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.

Create Layout Thumbnails

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.

Important:

You must activate the extension before any deployed changes take effect. See Manage Themes and Extensions for details.

Deploy an Extension to NetSuite.

8

Log into SMT and use the Layout Selector when creating a new page or editing an enhanced page.

SMT Page Layout Selector

Related Topics

Extensions for Site Management Tools (SMT)
Register Page Types and Templates for SMT
Create Custom Content Types for an Extension

General Notices