Kentico Xperience 13 documentation and ASP.NET Core

Most documentation about running Xperience applications under ASP.NET Core can be found in a dedicated section: Developing Xperience applications using ASP.NET Core. The rest of the documentation still applies, but some code samples and scenarios might need slight modifications for Core projects.

All major differences between the MVC 5 and Core platforms are summarized in Migrating to ASP.NET Core.


Page builder development

As a developer, you can enable content editors to create content on MVC sites using the page builder. The page builder provides a user-friendly interface where non-technical users can manage content using configurable widgets prepared by the developers. Users can also work with page templates to quickly create new pages based on predefined layouts.

The page builder should be used when you want to allow editors to create visually captivating pages and experiment with the design and layout. To learn more about scenarios for which the page builder is suitable, see Choosing the format of page content.

Page builder

To start using the page builder:

  1. Configure preview mode support on your site
  2. Enable the page builder
  3. Create pages with editable areas
  4. Implement and register widgets
  5. Implement and register sections (layouts for widgets)

Enabling the page builder

To use the page builder, you need to enable it as a feature in your MVC project.

  1. Open your MVC project in Visual Studio.

  2. Enable the page builder feature by calling the UsePageBuilder method of the ApplicationBuilder instance.

    • Enable the feature at the start of your application's life cycle, for example in the Application_Start method of your project's Global.asax file.

      MVC projects created by the installer contain the ApplicationConfig class, whose RegisterFeatures method is called in the Application_Start method by default. You can use this class to encapsulate all of your ApplicationBuilder code (enabling and configuring of Xperience MVC features).

      Note: The feature must be enabled before you register routes into the application's RouteTable. The Kentico().MapRoutes() method adds required routes based on the set of enabled features.

      using Kentico.Web.Mvc;
      using Kentico.Content.Web.Mvc;
      using Kentico.PageBuilder.Web.Mvc;
      protected void Application_Start()
          // Gets the ApplicationBuilder instance
          // Allows you to enable and configure Xperience MVC features
          ApplicationBuilder builder = ApplicationBuilder.Current;
          // Enables the page builder feature
  3. (Optional) Edit the project's Views\web.config file and add the Kentico.PageBuilder.Web.Mvc namespace.

    • The namespace allows you to easily access page builder extension methods in the code of your views.
    • Alternatively, you can add using statements for the namespace directly in the code of individual views.

        <pages pageBaseType="System.Web.Mvc.WebViewPage">
            <add namespace="Kentico.Web.Mvc"/>
            <add namespace="Kentico.PageBuilder.Web.Mvc"/>

The basic page builder feature is now enabled. You can prepare pages with editable areas in your MVC project and start developing widgets and sections.

Was this page helpful?