Create Custom CMS Page Types in SuiteCommerce

Create and register custom CMS page types in SuiteCommerce for enhanced website layouts and extensions.

·3 min read·View Oracle Docs

TL;DR Opening

Creating custom CMS page types in SuiteCommerce allows Site Management Tools (SMT) administrators to manage various page layouts effectively. This process includes defining new page types, creating templates, and utilizing the Extensibility API to enhance website content.

What Are Page Types?

Page types in SuiteCommerce serve as foundations for web pages. They allow administrators to introduce different layouts and functionalities for their online presence. Admins can designate a default landing page or customize newly created page types through extensions. Additionally, they can edit existing pages' layouts, enhancing the site's overall appeal.

Steps to Create Page Types

To successfully create and manage CMS page types, follow these essential steps:

  1. Set Up Your Extension
    To create a new CMS Page Type record, first modify the manifest.json file of your extension. Initially, this record must be created manually for testing and development. Once included in a bundle, the extension automatically creates the CMS Page Type upon installation.

  2. Create a View
    Develop a JavaScript file that extends PageType.Base.View.js. This is critical for rendering the new page type instance.

  3. Create a Template
    Define a default layout for your registered page type through a dedicated template.

  4. Register Your Page Type
    Use the Extensibility API to register your newly defined page type, making it available within SMT.

  5. Register Alternative Layouts
    You can set up alternative templates to provide various layout options for users creating or editing pages.

  6. Create Template Thumbnails
    Each template must have an associated thumbnail image to show options in the SMT when creating a new page.

  7. Deploy Your Changes
    After testing on a local server, deploy your extension files to your account. Ensure the extension is activated on a domain for testing within SMT.

  8. Use the Layout Selector
    Finally, log into SMT and utilize the Layout Selector to either create new pages or enhance existing ones.

Key Attributes of CMS Page Types

When creating a CMS Page Type record, consider the following attributes:

AttributeDescription
NameAn internal identifier for the page, not visible to site visitors.
Display NameThe external identifier that users see when selecting a page type.
DescriptionA short description of the page type.
Base URL PathSets the URL structure for pages of that type (e.g., mysite.com/blog/[page-url]).
Custom Record TypeLinks a Custom Content Type to the page type, allowing for additional fields and resources.
CMS CreatableDetermines if the page type is shown when creating a new page (Yes/No).
InactiveMarks the page type as inactive, preventing new page creation but allowing existing pages.

Who This Affects

  • Administrators: Responsible for setting up and managing page types in SuiteCommerce.
  • Developers: Tasked with creating extensions that enhance page functionalities.

Key Takeaways

  • Creating custom CMS page types enhances the versatility of the website.
  • Administrators can define multiple layouts and templates for various content needs.
  • The Extensibility API is essential for registering new page types and templates.

Source: This article is based on Oracle's official NetSuite documentation.

Frequently Asked Questions (4)

What prerequisites are necessary before creating a custom CMS page type in SuiteCommerce?
Before creating a custom CMS page type, you need to have access to Site Management Tools and modify the manifest.json file of your extension. Additionally, the extension must be tested and installed manually before it can automatically create the page type.
Do I need to register custom CMS page types with the Extensibility API for them to be available in SMT?
Yes, you need to use the Extensibility API to register your newly defined page types. This makes them available within the Site Management Tools (SMT) for selecting and managing layouts.
How can I provide alternative layout options for custom CMS page types?
You can offer alternative layout options by registering different templates for your page types. These templates can provide various design choices and are selectable in Site Management Tools.
What does the 'CMS Creatable' attribute signify when creating a CMS Page Type record?
The 'CMS Creatable' attribute determines if the page type is available when creating a new page in the Site Management Tools. Setting this attribute to 'Yes' allows users to select it for new pages.
Source: Create Page Types 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 Commerce

View all Commerce articles →