AI agents: the content index is at /llms.txt. Every page is also available as Markdown — send the request header Accept: text/markdown, or append .md to the page URL.
Xperience Docs

Cookie consent

We use necessary cookies (opens in a new tab) to run our website and improve your experience while browsing. Additional cookies are only used with your consent. You may revoke your consent on the Cookies Policy (opens in a new tab) page or in your browser at any time.

Configure (opens in a new tab)
  • Documentation
    Administration interface basicsDevelopers and adminsBusiness usersChangelogGlossary
  • Guides
    Welcome to Xperience by KenticoAdministration interface basicsCustomer journeysDigital marketingConfigurationDevelopmentArchitectureUpgrade to Xperience by Kentico
  • Training
    For AdminsFor Business usersFor DevelopersFor Solution architects
  • API Examples
    ConfigurationContent managementDevelopmentDigital marketing
  • Changelog
    Documentation updatesSecurity advisories
  1. Home
  2. Development
  3. Developer kickstart
  4. Define a page content type

Define a page content type


Was this page helpful?

Send us feedback Go back to top
  • Community Questions & Answers (opens in a new tab)
  • Contact support (opens in a new tab)

Previously, we created a reusable content type called *Slogan*. In order to use it in the website channel we defined in the last step, we'll need a page content type. Pages of this type will reference reusable Slogan items.

Add a page content type in the admin UI

Begin by navigating to Configuration → Content types → New content type.

Fill in the form with the following properties:

  • Display Name: Landing page
  • Namespace: Kickstart
  • Name: LandingPage
  • Icon: xp-market (type 'market' in the select list search bar)
  • Use for: select Pages from the dropdown
  • Include in routing: True (checked)

Save and switch to the Fields tab of the new Landing page content type. Add a field called LandingPageSlogan. Define the following properties to enable this field to reference Slogan items from the Content hub:

  • Field name: LandingPageSlogan (we recommend using the <content type name><field name> naming convention as explained here)

  • Data Type: Pages and reusable content

  • Display in editing form: True (Enabled)

  • Field caption: Slogan

  • Form component: Combined content selector

  • Form component configuration → Allowed content type: Slogan

    This links your reusable content type with the page and ensures only items of type Slogan will be allowed on any web page of type Landing page.

Your content type should look like this:

Our example page content type is very basic, with only one field. In production scenarios, the web page content type should also include reusable field schemas to represent structured data needed only for the web channel, such as those related to SEO, OpenGraph, and other web-specific metadata.

Link the type to the channel

Now you need to associate the page content type with the website channel from the previous step.

Switch to the Allowed in channels tab of the content type, and click Select channels.

Select Kickstart pages, and save the selection.

The Kickstart pages channel now shows up as an item in the list.

Next, you need to allow the content type in our channel's scope. Scopes in Xperience serve to limit which pages users can create in channels. By default, your Kickstart pages channel has one scope defined for root.

Switch to the Allowed in scopes tab of the content type, and click Add scopes.

Select Kickstart pages default scope, and Save the selection.

Now users are allowed to create pages of type Landing page in the root of your Kickstart pages channel.

If you navigate to Configuration → Channel management → Kickstart pages → Allowed content types, you will see the Landing page content type listed.

When you switch to the Scopes for content types tab and click on the "/" scope, you'll see the Landing page type listed under Allowed content types in scope as well.

Learn more about limiting page creation in channels in our docs.

Pages and page templates

At this point, you are technically able to create a page of type Landing page in your Kickstart pages channel. However, if you are following along with the Kickstart series, do NOT create a new page of this type yet.

A future step in this series will show how to create page templates. Pages that are not assigned a page template at the time of creation cannot be assigned one at a later time.

Generate a class for the Landing page content type

Just like with the Slogan content type, you need to generate a class to access the Landing page content type in your .NET solution. Go to the Kickstart.Web project in a new command window and run the following command:

BashGenerate code files
dotnet run --no-build -- --kxp-codegen --type "PageContentTypes" --location "../Kickstart.Entities/{type}/{name}" --include "Kickstart.LandingPage"

Agent-only content starts here: the section below is written for AI agents and automated tools reading the page HTML. Human visitors do not see it — the visible page carries the human-facing version.

BashGenerate code files
dotnet run --no-build -- --kxp-codegen --type "PageContentTypes" --location "../Kickstart.Entities/{type}/{name}" --include "Kickstart.LandingPage" --skip-confirmation

Agent-only content ends here. What follows is the visible page again, which human visitors and agents both receive.

Find more information about code generation on this documentation page or this video.

After the command or script above completes, you should see a new LandingPage.generated.cs file in the ~/PageContentTypes/LandingPage folder of the Kickstart.Entities project.

In the next step, we'll make some configurations to prepare the application to serve our page.

Continue learning

When you're ready, move on to the next page: Configure the project to display content

On this page

  • Add a page content type in the admin UI
    • Link the type to the channel
    • Generate a class for the Landing page content type
  • Continue learning