---
title: "Template Selector"
manual: "ke_search"
version: "main"
source: "Templating/TemplateSelector.rst"
rendered: "2026-09-25T08:10:48+00:00"
---

# Template Selector {#templatingtemplateselector}

It is possible to provide selectable template layouts to the editors, eg. a "list layout" and a "tile layout", or
different searchbox layouts.

![Select a template layout in plugin](../Images/Templating/template-layout-selector.png)

## Usage {#usage}

Register your new template layout in the *Page TSconfig*.
It will then appear in the plugin and the editor will be able to select it.

```typoscript
TCEFORM {
   tt_content {
      pi_flexform.ke_search_pi1.view.templateLayout.addItems {
         20 = Custom search box 1
      }
   }
}
```

Register your own template paths, see [Use your own templates](CustomTemplates.html#custom-templates).

Add the new layout inside a condition which checks for the setting `conf.templateLayout`.

```html
<f:layout name="General"/>
<f:section name="content">
   <f:if condition="{conf.templateLayout}">
      <f:if condition="{conf.templateLayout} == 10">
         <f:render section="defaultLayout" arguments="{_all}"/>
      </f:if>
      <f:if condition="{conf.templateLayout} == 20">
         <f:render section="customLayout" arguments="{_all}"/>
      </f:if>
   </f:if>
</f:section>

<f:section name="defaultLayout">
   ... default template code
</f:section>

<f:section name="customLayout">
   ... custom template code
</f:section>
```
