Configuring preview for content items

To preview the content items in your app, your developers first need to set up a preview environment for the web app. After that you can configure preview URLs in your Kentico Cloud project for each content type and see how the content items based on those types look in your app.

See how to configure previews inside the app.

Table of contents

    In the following example, you will learn how to configure a URL preview for content items based on a content type called Article. You can use the same approach for your own content types.

    Setting up preview URLs

    Your developer needs to configure two things in the project. Add the possibility of specifying URL patterns in content items via the URL slug element, and specify the website address at which the content items are available.

    Adding URL slug element

    Start by adding the element:

    1. From the app menu, choose Content models {@icon-content-models@}.
    2. Open the Article content type for editing.
    3. Add the URL slug auxiliary element to the content type. For example, you can label it "Page URL".

    Adding preview URLs for content types

    Then specify a website address for content items based on the Article content type:

    1. From the app menu, choose Project settings {@icon-settings@}.
    2. Under Development, choose Preview URLs.
    3. Select the checkbox for the Article content type.
    4. Type a full URL to the articles on your website. You can use the {Lang} and {URLslug} macros. For example, the website address can be: {~{Lang}/articles/{URLslug}~}.

    This content item has a URL slug element with the value of "roasting-coffee". Clicking the Preview button opens a new browser window with the {~ address~}.

    Note: Kentico Cloud doesn't check if the URL slug values in your content items are unique across your project. This means you can have multiple content items with the same URL slug.