---
title: Configure the project to display content
---

> 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).

You have created a _page content type – Landing page_ – with a field that allows for referencing another _reusable content type – Slogan_.
The next step in line with our recommended practices is to create a **Page template**.

But first, let’s get some necessary configuration tasks out of the way.

## Enable Content tree-based routing and Page Builder

Page templates require the following features to be enabled:

- [Page Builder](https://docs.kentico.com/documentation/developers-and-admins/development/builders/page-builder.md) allows editors to design web pages using drag-and-drop widgets, templates, and other configurations.
- [Content tree-based routing](https://docs.kentico.com/documentation/developers-and-admins/development/routing/content-tree-based-routing.md) creates URLs for web pages based on their position in the content tree and automatically handles requests to those URLs.

When you run your _Kickstart.Web_ project, you see a default message rendered on the screen:

&#x20;The Kickstart.Web site has not been configured yet.&#x20;

Right now, this message displays for any requests to the application to prevent errors. You need to remove the line of code that renders this message; otherwise, no pages will be accessible.

Open the _Program.cs_ file in your _Kickstart.Web_ project and remove or comment out this line of code:

```csharp title="Program.cs"
app.MapGet("/", () => "The Kickstart.Web site has not been configured yet.");
```

Now you can enable the Page Builder and Content tree-based routing in your [middleware pipeline](https://learn.microsoft.com/en-us/aspnet/core/fundamentals/middleware/?view=aspnetcore-8.0).

Un-comment the lines calling `UsePageBuilder` and `UseWebPageRouting` from the `features` collection passed to `builder.Services.AddKentico`.

```csharp title="Program.cs"
...
// Enable desired Kentico Xperience features
builder.Services.AddKentico(features =>
{
    features.UsePageBuilder();
    // features.UseActivityTracking();
    features.UseWebPageRouting();
    // features.UseEmailStatisticsLogging();
    // features.UseEmailMarketing();
});
...
```

Add `using` directives for `Kentico.PageBuilder.Web.Mvc` and `Kentico.Content.Web.Mvc.Routing` to resolve errors.

```csharp title="Program.cs"
using Kentico.Content.Web.Mvc.Routing;
using Kentico.PageBuilder.Web.Mvc;
...
```

Provide `PageBuilderOptions` with the _Landing page_ content type name to the `UsePageBuilder` method – add `using Kickstart` to resolve errors.

> **Tip:** Use the `CONTENT_TYPE_NAME` constant from the [generated class](https://docs.kentico.com/documentation/developers-and-admins/api/generate-code-files-for-system-objects.md) to access the content type identifier.

```csharp title="Program.cs"
...
using Kickstart;
...
builder.Services.AddKentico(features =>
{
    features.UsePageBuilder(new PageBuilderOptions {
        ContentTypeNames = new[] {
            LandingPage.CONTENT_TYPE_NAME,
        }
    });
    ...
});
...
```

If you run your project now, your website will display an [HTTP 404](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/404) error. That’s because you removed the temporary message, and we haven’t defined a home page yet. We will fix that soon. You should still be able to sign in to the administration UI when you navigate to _\~/admin_.

🎬 [Video](https://docs.kentico.com/docsassets/guides/configure-the-project/check-your-progress.mp4)

## Create a ViewImports file

The second small step in preparation for displaying content is setting up a [ViewImports file](https://learn.microsoft.com/en-us/aspnet/core/mvc/views/layout?view=aspnetcore-8.0#importing-shared-directives).

ViewImports files allow sharing directives across all views in the application or a particular subdirectory. (Typically `@using` directives and tag helpers.)

Many templates and components will need to use the same resources. Let's make things easier and use a global _\_ViewImports_ file to centrally manage imports for all future templates.

Create a new empty Razor view named _\_ViewImports.cshtml_ in the root of your _Kickstart.Web_ project.

Add the following directives and tag helpers:

```cshtml title="_ViewImports.cshtml"
@using CMS.Helpers
@using Kentico.Web.Mvc
@using Kentico.PageBuilder.Web.Mvc
@using Kentico.Content.Web.Mvc.PageBuilder

@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
@addTagHelper *, Kentico.Content.Web.Mvc
@addTagHelper *, Kentico.Web.Mvc
@addTagHelper *, Kickstart.Web
```

This will allow any future page template views you add to use common features without explicit `@using` directives.

> **Info:** See an example _\_ViewImports.cshtml_ in our [Kickstart repository ](https://github.com/Kentico/xperience-by-kentico-kickstart/blob/main/src/Kickstart.Web/_ViewImports.cshtml).

> **Tip:** Learn more about the [available tag helpers](https://docs.kentico.com/documentation/developers-and-admins/development/reference-tag-helpers.md) in the Xperience by Kentico.

Now that you have added these configurations to your project let’s move on to the next step: building a page template.

## Continue learning

When you're ready, move on to the next page: [Build a page template](https://docs.kentico.com/guides/development/developer-kickstart/build-a-page-template.md)
