2

I've installed stencil and all its dependencies locally and was able to create a couple custom component but I can't figure out how to set a custom template for a custom "webpage" in bigcommerce.I thought it would be a matter of creating a custom page template (custom-page.html) in /templates/pages/ but that doesn't seem to hook it up. In the legacy version, you were able to select a page template from a dropdown. Is it a matter of uploading the theme via webDAV first? Is there a JS module required or config.JSON setting to register a template? Any help would be much appreciated.

Deagle
  • 23
  • 5

3 Answers3

0

Currently, you cannot set custom templates. This is on the roadmap and would be facilitated through the control panel.

Alyss
  • 1,866
  • 1
  • 13
  • 27
0

To create custom template for webpage you need to place the file(e.g _custom-page.html that you have created) in template/pages/custom/pages directory.

To test it locally, you need to assign the custom template to the url in .stencil file. For example,

"customLayouts": {

"products": {},
"pages": {"_custom-page.html":"/{you-webpage-url}/"},
"brands": {},
"categories": {}
 }

Currently, this feature is in beta and so you cannot assign the custom template to the desired webpage url in bigcommerce server. However you can do so by requesting bigcommerce customer service to enable this feature for your site and by accepting their condition for beta not supporting many features.

Note: Custom template name should start with _(underscore). Check I have changed your file name custom-page.html to _custom-page.html. Also I have assigned the _custom-page.html to pages directory, since you have created custom template for webpage.

Janki Gadhiya
  • 4,492
  • 2
  • 29
  • 59
Rohan
  • 71
  • 7
0

This feature is no longer in beta. It is live the correct path for the custom templates for a custom page is templates\pages\custom\page

Upload a file like custompagetemplate.html into this folder.

There was an issue with manifest.json causing this feature not to work. Once this file was removed it was live and active on Bigcommerce.

user2152758
  • 108
  • 2
  • 8