Page-Level Custom Attributes
You can define custom page-level attributes for a page type. For example, you can define custom attributes for title, Image, and Description. Merchants can use those attributes to specify the image and text that appears in the search results for a page.
Define the page-level attributes in the meta definition file for the page type. This example shows three attributes defined for a Search Results Title, Search Results Image, and Search Results Description.
promopage.json
{
"name": "Promopage",
"description": "A promotional page.",
"attribute_definition_groups": [{
"id": "search",
"name": "Search Results Display",
"description": "Define the title, image, and description returned in search results for the page.",
"attribute_definitions": [{
"id": "title",
"name": "Search Results Title",
"description": "The page title displayed in search results.",
"type": "text",
"required": false
},
{
"id": "image",
"name": "Search Results Image",
"description": "The image displayed in search results.",
"type": "file",
"required": false
},
{
"id": "description",
"name": "Search Results Description",
"description": "The page description displayed in search results.",
"type": "text",
"required": false,
}
],
"region_definitions": [{
"id": "header",
"name": "Name",
"description": "Header of the promopage",
"max_components": 1
},
{
"id": "main",
"name": "Main",
"description": "Main area of the promopage",
"component_type_exclusions": [{
"type_id": "banner"
}]
},
{
"id": "footer",
"name": "Footer",
"description": "Footer of the promopage",
"max_components": 1
}
]
}]
}