Settings Object
Deprecation Notice
Vue-based themes will soon be deprecated. Please switch to React-based themes, as all future updates and support will focus exclusively on React.
The settings
object lets you access a section's properties and setting values.
settings.name
Returns the name of the section.
settings.label
Returns the label of the section.
settings.props
Returns an object of all the props. More about props.
settings.blocks
Returns an array of section blocks. More about Blocks.
settings.preset
Returns an array of section preset. This can be used to set a default value for blocks.
Example
theme/templates/pages/wishlist.vue
{
"name": "featuredProducts",
"label": "Featured Products",
"props": [
{
"type": "text",
"id": "heading",
"default": "Featured Products",
"label": "Section Heading"
},
{
"type": "checkbox",
"id": "full_width",
"default": false,
"label": "Full width",
"info": "Check to allow items to take the entire width of the viewport"
}
],
"blocks": [
{
"type": "product",
"name": "Product",
"props": [
{
"type": "product",
"id": "product",
"label": "Select a Product",
"info": "Product Item to be displayed"
}
]
}
],
"preset": {
"blocks": [
{
"name": "Product"
},
{
"name": "Product"
},
{
"name": "Product"
},
{
"name": "Product"
}
]
}
}