---
title:        "Content personafication"
description:  "Influencing the output of content based on the target audience in Kentico is very easy. This post contains the basics to get you familiar with personas and personalisation using two handy Kentico macros."
url:          https://www.jeroenfurst.nl/blog/content-personafication
date:         2016-05-31
category:     Personalisation
tags:         [Personalisation]
reading_time: 1
---

# Content personafication

> Influencing the output of content based on the target audience in Kentico is very easy. This post contains the basics to get you familiar with personas and personalisation using two handy Kentico macros.

## Step 1: Define the persona

The first thing we need to do is create the persona. In this example I am using the Dancing Goat starter site to showcase content personalisation. The persona in question is Espresso Eddy who just loves to get his shot of caffeine on a regular basis.
 
 *For more info on personas check out the Kentico [documentation](https://docs.kentico.com/display/K9/Personas).*
 
 ![Configure persona](~/getContentAsset/e99cf713-d33f-498e-b3a2-cd6e839a2761/310c1ea5-13ca-4d75-95a0-620f51989b44/268a1b1b_configure_persona.PNG.PNG)
 Did you know you can upload your own persona images? You can do this in Modules --> Personas --> Thumbnails.

## Step 2: Assign the persona to the content

To personalise content we need to somehow mark or tag pages and assign one or more personas to it. Kentico supports this out of the box via the properties tab of pages. Open the personas tab and assign your favorite personas to the page.
 
 ![Assign persona](~/getContentAsset/ebe35a0c-3a63-4669-9fba-5b9f12b3a9ae/310c1ea5-13ca-4d75-95a0-620f51989b44/a2e65d38_assign_persona.PNG.PNG)
 
 Congratulations, you are now ready to personalise! Follow step 3a to **filter** or step 3b to **sort** the content using two nifty macro expressions.

## Step 3a: Filter the coffee

Example: navigate to the design tab of the homepage and configure the "Articles" universal viewer web part. Add the following macro expression in the where condition field: **PersonaDocumentWhereCondition**
 
 ![Persona Where Condition](~/getContentAsset/721f6121-ed12-4417-bb1f-bbae21b4fdbc/310c1ea5-13ca-4d75-95a0-620f51989b44/a1075ffb_where_condition.PNG.PNG)
 
 This will result in a **filtered** overview which can be viewed using the perona filter (right top corner). Notice that it will only display the content assigned to the persona.
 
 ![Filtered coffee](~/getContentAsset/18f9cfb0-93f7-4191-881d-90b669899e66/310c1ea5-13ca-4d75-95a0-620f51989b44/b94a21a5_where_result.PNG.PNG)

## Step 3b: Sort the beans

Example: navigate to the design tab of the homepage and configure the "Articles" universal viewer web part. Add the following macro expression in the order by condition field: **PersonaDocumentOrderBy**
 
 ![Order By Condition](~/getContentAsset/0824620e-cf78-4f03-8374-058a1406e213/310c1ea5-13ca-4d75-95a0-620f51989b44/ba7a1bb4_orderby_expression.PNG.PNG)
 
 This will result in a **sorted** overview which can be viewed using the perona filter (right top corner). Notice that content tagged to the persona will be listed first.
 
 ![Sorted beans](~/getContentAsset/70ca31c3-f2bc-4ec9-bec0-9fd0efaaf620/310c1ea5-13ca-4d75-95a0-620f51989b44/a3326387_orderby_result.PNG.PNG)
 
 It's now up to you to implement personalisation in your Kentico sites. Enjoy!
 
 *Check out the documentation for more information on [recommending personas](https://docs.kentico.com/display/K9/Recommending+pages+to+personas).*