---
title: Search block templates
slug: cms-12/docs/searching-block-templates
docTags: 
createdAt: 2026-08-10T15:55:59.000Z
---

:::hint{type="info"}
**Note**
[Optimizely Forms](docId:3SbSlJZIS_3iFmghfQA3J) is only supported by MVC-based websites and HTML5-compliant browsers.
:::

The `ICustomViewLocation` interface provides paths for searching element block views.

These interface implementations return an array of paths. These paths are used by `Forms.Core` to look up view template for `Blocks`.

`CustomViewLocationBase` is a base implementation (in `Forms.UI`) for this interface, and `FormsViewLocation` is the default implementation in Forms.

```csharp
/// <summary>
/// Default element block view location paths.
/// </summary>
[ServiceConfiguration(typeof (ICustomViewLocation))]
public class FormsViewLocation: CustomViewLocationBase {
  public override int Order {
    get {
      return 1000;
    }
    set {}
  }
  public override string[] Paths {
    get {
      return new string[] {
        EPiServerFormsSection.Instance.FormElementViewsFolder, GetDefaultViewLocation()
      };
    }
  }
}
```

Suppose the **Forms.Samples** project has this class. `Forms.Core` looks for `Element` template in `~/Views/Samples/ElementBlocks` and the default view location of the Samples add-on (in `~\\modules\\\_protected\\EPiServer.Forms.Samples\\Views\\ElementBlocks`).

```csharp
[ServiceConfiguration(typeof (ICustomViewLocation))]
public class FormsSamplesViewLocation: CustomViewLocationBase {
  /// <summary>
  /// This will be loaded before path of Form.Core
  /// </summary>
  public override int Order {
    get {
      return 500;
    }
    set {}
  }
  public override string[] Paths {
    get {
      return new string[] {
        "~/Views/Samples/ElementBlocks",
        GetDefaultViewLocation()
      };
    }
  }
}
```
