Customizing forum design

The system stores forum layouts in <web project>\CMS\CMSModules\Forums\Controls\Layouts. By default, the folder contains three sub-folders.

  • Custom
  • 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 or use the default Custom folder (the system 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.

    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

  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:

  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.