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:
- Assign personas to pages
- Place a web part recommending the content
- (Optional) Configure how the web part displays content
- 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:
- Open the Pagesapplication.
- In the page tree, select the page on which you want to recommend content.
- On the Design tab, place the Persona-based Recommendations web part on the page.
- In the Content category, select the Path to the pages that the web part displays.
- (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.
- (Optional) Specify the maximum amount of pages to be loaded in the Select top N pages field.
- 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.
- (Optional) To increase performance, specify the Columns that are loaded for the displayed pages.
- Use only the columns that you load in your transformations.
- (Optional) Configure how the web part chooses the pages it displays.
- Specify the rest of the web part properties.
- 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:
- In the Pages application, switch to the Design tab.
- Open the Persona-based recommendations web part’s menu () and click Configure.
- In the web part properties, remove the macro in the ORDER BY expression.
- 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.
- Into the WHERE condition field, enter the following macro: {% PersonaDocumentWhereCondition %}
- The where condition ensures that only tagged pages are displayed. Note that the WHERE condition also loads pages faster than the default OrderBy macro.
- 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.