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.

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.

See how to configure previews inside the app.

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.
  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.
  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:https://mywebsite.com/{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 https://mywebsite.com/en-US/articles/roasting-coffee 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.

Did this answer your question?