Search code examples
bigcommercecornerstonestencils

How to create new template in Cornerstone theme using stencil framework


I am new to Bigcommerce, I need to create a page template in my Bigcommerce theme (Cornerstone).

I have followed the documentation but its redirected to 404 page. Please help me in this.

I have also tried with the below link but the Url redirected to 404 page Creating a custom page template in stencil for bigcommerce

Note : I have installed stencil framework in local environment and trying it

https://developer.bigcommerce.com/stencil-docs/template-files/custom-templates/about-custom-templates


Solution

  • One common cause for 404 errors when working with custom templates locally is that the page the custom template has been mapped to isn't a page that exists in the live store. For example, if you map "custom-product.html":"/my-product/" in your .stencil file, you'll need to have created a product page in your live store with the URL /my-product/. The template needs to map to a live page of the same type: if you're creating a webpage, you'll need to map to a real webpage; if you're creating a category page, you'd map the custom template to one of your existing category URLs. Hope this helps!