<template_name>.tsx
file under the src/templates
folder.src/templates/templates.ts
file. Here, you will see other templates being imported
and exported
.template-list.ts
file, which looks like this:
experroTemplateMap
:
default
indicates that all the templates registered under this default
key will be available by default for the Default Channel
and all other channels. This will remain the case until we provide any channel-specific templates.
To create a channel-specific template, you need to have the channel ID, which you can get from Channel Details. Just copy it and create a new object key for experroTemplateMap
.
For example, if you want to create a specific Product Details
template for a second channel, different from the default channel, follow these steps:
<template_name>.tsx
file for the new template.experroTemplateMap
to include a new key for the channel ID.experroTemplateMap
will look:
Product Details
template is available for the default channel, while the Product Details Exp 2
template is specific to the channel with ID ad7e9f63-6532-4e2a-9adf-fb312a635ffe
.
So, For the channel with ID ad7e9f63-6532-4e2a-9adf-fb312a635ffe
, Experro will load the Product Details Exp 2 template instead of the default Product Details Default template. This allows you to have channel-specific templates while falling back to the default templates for other channels.
That’s only few steps need to perform to create a Channel specific templates.