Anybody know if it’s possible to import a template...
# suitecommerce
j
Anybody know if it’s possible to import a template from a theme into an extension? Like if I want to create an alternate template for a PDP, but I want to use the same basic layout as the theme’s PDP with just a new stylesheet. Does that make sense?
s
Yes. The feature we have in place for that is called Layout Selector (http://system.netsuite.com/app/help/helpcenter.nl?fid=chapter_1549386933.html). When alternative templates are available, you or a business user can go into the SMTs, visit the page you want to change, and select an alternative layout for it if one exists.
As a developer, you can add new templates via extensions by using the Page Type component's
registerTemplate()
method
j
Thanks, @Steve Goldberg. I’ve gone through that tutorial before and have had some success with it. In my case, I’m not really creating a new layout, though. I was hoping to use the existing PDP layout, but just use the layout selector to basically select a stylesheet for that specific page. I was trying to avoid a situation where if I made a change to the theme’s PDP, I would have to remember to change it in the layout template I had created. I was hoping there was a way to import the existing template into the new one (kind of like importing an external SASS file).
s
Then no
j
Fair enough.