Recommending pages to personas through web parts

Kentico EMS required

Features described on this page require the Kentico EMS license.

You can recommend different pages on a page based on current visitor’s persona. In addition to recommending pages to personas through widgets, you can also recommend pages to personas through web parts and configure how the web parts display content.

To recommend content to personas through web parts:

  1. Assign personas to pages
  2. Place a web part recommending the content
  3. (Optional) Configure how the web part displays content
  4. Preview content for different personas

Placing a web part to recommend content to personas

To recommend pages to personas through web parts, you need to have the Design website permission for the Design module. You can use the Persona-based Recommendationsweb part that offers more settings than the Persona-based Recommendations widget, which can be used by content editors.

To place the Persona-based Recommendations web part on a page:

  1. Open the Pagesapplication.
  2. In the page tree, select the page on which you want to recommend content.
  3. On the Design tab, place the Persona-based Recommendations web part on the page.
  4. In the Content category, select the Path to the pages that the web part displays.
  5. (Optional) Select the Page types that the web part displays.
    • Not selecting any Page types makes the web part display pages from any page types.
  6. (Optional) Specify the maximum amount of pages to be loaded in the Select top N pages field.
  7. In the Transformations category, selecta transformation for displaying the content.
    • By default, transformations for displaying news articles and e-commerce products are available. You can create new transformations in the Personas.Transformation page type.
  8. (Optional) To increase performance, specify the Columns that are loaded for the displayed pages.
    • Use only the columns that you load in your transformations.
  9. (Optional) Configure how the web part chooses the pages it displays.
  10. Specify the rest of the web part properties.
  11. Confirm changes by clicking Save & Close.

Now, when a visitor assigned to a persona visits the page, the web part displays the pages for the particular persona.

Configuring how the Persona-based recommendations web part displays content

By default, if there are not enough tagged pages to display for the persona viewing the page, the web part displays other pages of the specified Page types. You can change the behavior so that only the tagged pages for the specific persona are displayed.

To change which pages the web part displays:

  1. In the Pages application, switch to the Design tab.
  2. Open the Persona-based recommendations web part’s menu () and click Configure.
  3. In the web part properties, remove the macro in the ORDER BY expression.
    1. The expression sorts pages so that tagged pages are displayed first. Untagged pages are displayed only if there are b=not enough tagged pages to display.
  4. Into the WHERE condition field, enter the following macro: {% PersonaDocumentWhereCondition %}
    1. The where condition ensures that only tagged pages are displayed. Note that the WHERE condition also loads pages faster than the default OrderBy macro.
  5. Click Save & Close.

You have changed the behavior of the web part so that it only displays pages tagged by the visitor’s persona.

Loading and displaying data

You can also refer to Loading and displaying data on websites for more general information on using repeaters in the system.