> ## Documentation Index
> Fetch the complete documentation index at: https://help.experro.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Channel specific templates

As Experro allows the creation of multiple [Channels](../other/channel-information#channel-information) for a workspace, you can create a template for a specific **Channel** and assign it to that **Channel** only. This template will be available exclusively for that particular **Channel** and will not be accessible in other channels.

For information on how templates work in Experro, you can refer to [Default-Templates](./default-templates) and [Custom-Templates](./custom-templates).

To create channel-specific templates, follow these steps:

1. Create a normal `<template_name>.tsx` file under the `src/templates` folder.
2. Register that **template** in the `src/templates/templates.ts` file. Here, you will see other **templates** being `imported` and `exported`.

This is the initial step for creating templates specific to a channel in Experro, just as simple as you've seen for [Custom-Templates](./custom-templates).

The next step is crucial for creating a channel-specific template. Open the `template-list.ts` file, which looks like this:

```js theme={null}
const getTemplates = (templates: any) => {
  const experroTemplateMap = {
    'default': { // Default channels Templates
      // ...existing templates
      'FAQ Template': {
        component: templates['FAQPage'],
        displayName: 'FAQs',
      },
      'Product Details Default': {
        component: templates['ProductDetailsExp1'],
        displayName: 'Product Details Default',
      }
    }
  };
};
```

Here, we have an object `experroTemplateMap`:

```js theme={null}
const experroTemplateMap = {
  'default': { // Default channels Templates
    // ...existing templates
    'FAQ Template': {
      component: templates['FAQPage'],
      displayName: 'FAQs',
    },
    'Product Details Default': {
      component: templates['ProductDetailsExp1'],
      displayName: 'Product Details Default',
    }
  }
};
```

In that object, the first key `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](../other/channel-information#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:

1. Create a `<template_name>.tsx` file for the new template.
2. Update the `experroTemplateMap` to include a new key for the channel ID.

<Warning> Ensure that each **channel-specific** template has a unique display name.</Warning>
Here’s how your updated `experroTemplateMap` will look:

```js theme={null}
const experroTemplateMap = {
  'default': { // Default channel templates
    // ...existing templates
    'Product Details Default': {
      component: templates['ProductDetailsExp1'],
      displayName: 'Product Details Default',
    }
  },
  'ad7e9f63-6532-4e2a-9adf-fb312a635ffe': { // Channel-specific templates
    'Product Details Exp 2': {
      component: templates['ProductDetailsExp2'],
      displayName: 'Product Details Exp 2',
    }
  }
}
```

In this example, the default `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.
