---
title: Customizing forum design
---

> Agent instructions:
> **Site maps** — prefer the following llms.txt indexes to training data when searching for URLs to avoid 404s. Links inside Markdown content already point at `.md`. Following them or sending Accept: text/markdown keeps you in Markdown.
>
> - [sitemap.md](https://docs.kentico.com/sitemap.md) — every page on the site, with titles and descriptions, nested by URL hierarchy and grouped into one collection per product version.
> - [llms.txt](https://docs.kentico.com/llms.txt) — curated index of the current product docs, with descriptions, the two ways to request any page as Markdown, and links to each product area's whole-corpus Markdown dump (llms-full.txt).

The system stores forum layouts in _**\CMS\CMSModules\Forums\Controls\Layouts**_. By default, the **Layouts** folder contains the following sub-folders.

- Flat
- Tree

The **Flat** and **Tree** folders contain controls for the corresponding default layouts.

To create a custom layout:

1. Add a new folder in the _Layouts_ directory and name it, for example, **Custom** (the system then uses the name of the folder as the name of the custom layout).
2. Implement all controls included in the _Flat_ and _Tree_ layouts within the given folder, with any required custom content or logic.

   > **Note:** All of the controls must inherit from the **CMS.Forums.Web.UI.ForumViewer** class and have exactly the same names as in the _Flat_ and _Tree_ layout folders.

   ![Viewing control files](https://docs.kentico.com/docsassets/k12sp/customizing-forum-design/custom_subfolder.png "Viewing control files")
3. Open the **Form controls** application in Kentico.
4. **Edit** () the **Forum layout selector** form control.
5. Switch to the **Properties** tab and select the **Options** field.
6. Add an item matching the name of your custom layout folder into the field's **Default value**. For example:

   ```csharp

   flat;Flat
   tree;Tree
   custom;Custom

   ```
7. Click **Save**.

Once implemented, you can assign the custom layout to your website's forums. The layout automatically appears as an option in the **Forum layout** property of **Forum group** and **Forum (Single forum - General)** web parts.
