Templates with section zones
Status: Draft
Summary
Redefine shape of Template data source to provide greater flexibility, layout functionality, and zones for sections.
interface Template {
layoutName: string
zones: [Zone]
}
interface Zone {
name: string,
sections: [Section]
}
// for example:
const homePageTemplate: Template = {
layoutName: 'default',
zones: [
{
name: 'main',
sections: [ ... ]
},
]
}
const searchPageTemplate: Template = {
layoutName: 'search',
zones: [
{
name: 'no-results',
sections: [ ... ]
},
{
name: 'results-found',
sections: [ ... ]
},
{
name: 'no-query',
sections: [ ... ]
}
]
}
const checkoutPaymentsPageTemplate: Template = {
layoutName: 'checkout',
zones: [
{
name: 'main',
sections: [ ... ]
},
{
name: 'sidebar',
sections: [ ... ]
},
]
}
const cmsHelpPageTemplate: Template = {
layoutName: 'cms-sidebar',
zones: [
{
name: 'main',
sections: [ ... ]
},
{
name: 'sidebar',
sections: [ ... ]
},
]
}