Page

Documentation article about Page

·3 min read·View Oracle Docs

Page

Page

If your extension is set up to include a new CMS Page Type, you must manually add a page type definition within your extension's manifest.json. When an Extension SuiteApp is installed into a NetSuite account, this entry ensures that the CMS Page Type record is created in NetSuite. This is required if creating a new Page Type for use with Site Management Tools (SMT).

The page object includes the types array, which introduces each new page type included in the extension. All fields correlate to the CMS Page Type record in NetSuite:

  • name (required) - Sets the name of the Page Type. This becomes the name of the CMS Page Type record. This must match the name attribute when registering your Page Type with PageTypeComponent.registerPageType() in your extension. See Register Page Types and Templates for SMT for details. This is required.

  • displayName (required) - This string sets the label displayed in SMT for the Page Type when creating a new page.

  • description - (optional) This string sets the description of the Page Type.

  • baseUrlPath (optional) - This string sets the base URL path for all the pages of this page type. For example, if you a have a page type called blog and a base URL path of blog, all blog pages are accessed by mysite.com/blog/[page url].

  • settingsRecord (optional) - This string sets the ID of any custom record you associate with this page type, inheriting the custom record settings when you add or edit the page type.

json
1//...
2"page": {
3 "types": [
4 {
5 "name": "blog",
6 "displayName": "Blog",
7 "description": "This is a blog page type",
8 "baseUrlPath": "blog",
9 "settingsRecord": "custrec_page_type_test"
10 },
11 {
12 "name": "other-page-type",
13 "displayName": "My other page type",
14 "description": "This is another page type",
15 }
16 ]
17}
18//...

--- Context from https://docs.oracle.com/en/cloud/saas/netsuite/ns-online-help/section_1547495743.html --- When site administrators create a new page in Site Management Tools (SMT), they define it as a specific page type. Site administrators can assign the Landing Page page type or any new page type, if registered using a SuiteCommerce extension.

As the extension developer, you use the Extensibility API to register new page types for this purpose. You can also register templates to either be the default layout for your new page type or as an alternative layout option for any new or pre-existing page type. When your extension is installed and activated, these page types and templates appear as selectable options when creating new pages or enhancing existing pages in SMT.

Note:

This topic is one step of a larger process, as explained in Create Page Types.

For example, you create a new blog extension. Within the extension, you register a new Blog page type with a default template (layout). You also register two different templates as alternatives for your blog page type. Later, after installing and activating your extension, Blog is now available as a page type when creating pages in SMT. After creating a new blog page, site administrators can keep the default layout registered for that page, or they can choose from one of the two predefined alternative layouts.

This tutorial explains how to:

Step

Description

Create a View to Render a Registered Page Type

This topic explains a few important details about any view required to render your new page type.

Register a Page Type

This topic explains how to access the Extensibility API to register a page type and declare a default template.

Register a Template

This topic explains how to access the Extensibility API to register a template and make it available as an alternative layout for one or more page types.

Related Topics

Frequently Asked Questions (4)

How do I add a new CMS Page Type to my NetSuite extension?
To add a new CMS Page Type, you must manually include a page type definition in your extension's manifest.json. This is necessary to ensure that the CMS Page Type record is created in NetSuite when the Extension SuiteApp is installed.
What attributes are required when defining a new page type in the manifest.json?
When defining a new page type in the manifest.json, you need to include the 'name' and 'displayName' attributes. The 'name' sets the Page Type name, which must match the name used when registering with PageTypeComponent.registerPageType(). The 'displayName' sets the label shown in SMT.
Can I associate a custom record with a new page type?
Yes, you can associate a custom record with a new page type using the 'settingsRecord' attribute in the page type definition. This ID allows the page type to inherit the settings of the custom record when added or edited.
Is it possible to register alternative templates for a new page type in NetSuite?
Yes, you can register alternative templates for a new page type using the Extensibility API. These templates can serve as default or optional layouts for your page types, available to choose from when creating pages in SMT.
Source: Page Oracle NetSuite Help Center. This article was generated from official Oracle documentation and enriched with additional context and best practices.

Was this article helpful?

More in General

View all General articles →