Pages
The pages
folder contains json files and each json file represents one page. There are some required pages that must
be defined. There are some optional pages as well. Other than these, custom pages can be defined as well.
Basic page schema
A basic page might look like this:
{
"schema": "https://builderoo.dev/schema/page.json",
"layout": {
"component": "DefaultLayout"
},
"sections": [
{
"component": "PageIntro"
},
{
"component": "FeaturedProducts"
},
{
"component": "ProductCategories"
},
{
"component": "Subscribe"
}
]
}
See PageSchema object for a full structure.
Page types
There are various types of pages. Each types of pages shows different types of data. Multiple variations can be created for each page types. The file names of the pages follow this format:
Here are all the types:
Type | Example file name | Data hook |
---|---|---|
index | index.json | |
product | product.json product.shoes.json product.clothes.json | useProduct() |
collection | collection.json collection.flashy.json collection.minimal.json | useCollection() |
collection | collections.json | useCollectionList() |
search | search.json | useSearch() |
order | order.json | useOrder() |
orders | orders.json | useOrderList() |
blog | blog.json blog.offers.json | useOrder() |
article | article.json article.gallery.json | useArticle() |
Some page types have special React hook that returns data for those specific pages as shown in the table above. These are page specific hooks, meaning, these hooks cannot be used in other pages. Same hook can be used multiple times in multiple sections of a page.
There are also custom pages that can be built-in in the theme. Users can also create and edit custom pages from the admin panel. This is explained in Custom Pages