Register Page Types and Templates for Site Management Tools
Learn to register new page types and templates in Site Management Tools, enhancing layout options for website pages.
When site administrators create a new page in Site Management Tools (SMT), they define it as a specific page type. They can assign the Landing Page page type or any new page type registered through a SuiteCommerce extension.
As an extension developer, you utilize the Extensibility API to register new page types for this purpose. You can also register templates that serve as the default layout for your new page type or as alternative layout options for any existing page type. After installing and activating your extension, these new page types and templates become selectable during the page creation or enhancement process within SMT.
Example Use Case
For instance, if you create a new blog extension, you would:
- Register a new Blog page type with a default template.
- Register two additional templates that serve as alternative layouts for your blog page type.
Once your extension is activated, Blog will be available as a page type since administrators can either retain the default layout or select from the predefined alternatives when creating a new blog page.
Setting Up New Page Types and Templates
This tutorial outlines the essential steps for registering page types and templates in your extension:
-
Create a View to Render a Registered Page Type: This section covers important aspects of any view required to render your new page type.
-
Register a Page Type: Instructions on how to leverage the Extensibility API to register a page type and declare a default template are found here.
-
Register a Template: This part guides you in accessing the Extensibility API to register a template, making it available as an alternative layout for the page types.
Best Practices for Views
When registering a page type using the PageType Component, it’s crucial to create a corresponding view:
- Ensure the view handles requests for a registered page type and extends
PageTypeBase.View.js. - Declare the view in the
registerPageType()method while registering the associated type. - Control the rendering of the page type using the
beforeShowContent()method.
Example View Setup
Here’s how to extend a view for a registered page type:
1"text-purple-400">define('MyPageType.View'2, [3 'PageType.Base.View'4 , 'My_New_Default_Template.tpl'5 ]6, "text-purple-400">function (7 PageType8 , My_New_Default_Template_tpl9 ) {10 // Custom rendering logic11 }12);This outlines how to incorporate your templates and manage dependencies effectively.
Conclusion
By following these steps and best practices, you can effectively register page types and templates in Site Management Tools, allowing for greater flexibility and customization of web pages within your NetSuite site. This process ultimately enhances the website’s content management capabilities, empowering site administrators to create diverse and tailored user experiences.
Frequently Asked Questions (4)
How can I register a new page type in Site Management Tools?
What additional steps are needed after registering a page type to ensure it renders correctly?
Can I register multiple templates for a single page type?
Is it necessary to activate the extension for new page types and templates to be selectable in Site Management Tools?
Was this article helpful?
More in Commerce
- Available Items Only Feature in NetSuite 2026.1
Available items only filtering boosts sales efficiency in NetSuite 2026.1 with Intelligent Item Recommendations.
- Commerce Extensions in NetSuite 2026.1
Commerce Extensions in NetSuite 2026.1 enhance performance and user experience in eCommerce.
- Convert Multiple Transaction Line Items into Configured Items in
Enhance transaction processing in NetSuite by converting multiple line items into configured items with improved session handling.
- New SuiteCommerce Features in NetSuite 2026.1
New SuiteCommerce features in NetSuite 2026.1 enhance user experience and improve eCommerce efficiency.
