Skip to navigation

Configuring conditional content for a block

With conditional content (also known as variable or dynamic content), you can send a single campaign to your entire list while showing different blocks to different target groups. In Laposta, text, images and videos are always placed inside content blocks. If you attach conditions to one of these blocks, only the subscribers who meet those conditions will see it. Every customer can use this feature, even with a free account.

For example, suppose you are creating an internal newsletter for all employees in your organisation, and your list includes each employee’s job title in the extra text field ‘Role’. In that single newsletter, you want to include:

  • two text blocks that are only visible to board members
  • an image that is only visible to all other employees.

Instead of sending two versions to two different segments, you set a condition on the text blocks for the board so that the ‘Role’ field must contain the fragment Board. The rest of your list will receive the exact same campaign, just without those blocks.

Setting up conditional content

Conditional content only works in a campaign. A template and an email in an automation cannot contain rules, so you cannot place conditional content in them.

1

Open the conditional content settings

Select the block and click the ‘Conditional content’ icon. In the drag & drop editor, this icon is in the top right-hand corner of the content block. If you are working with a custom template of the Joe type, it is on the far right, next to the buttons for adding, moving and deleting blocks.

2

Specify the conditions

Choose a field, a comparison and a value. You can use all the fields from the lists you selected in step 2 (Recipients). If you leave this blank, all of those recipients will simply see the block.

The condition 'City is equal to York' in the Conditional content pop-up
3

Add any extra rules and save

Click ‘Add rule’ to add extra conditions, up to a maximum of five rules per block. Choose whether a subscriber must meet all rules (the AND function) or any one of the rules (the OR function), and click ‘Save’.

Conditional content with multiple lists

If you have selected multiple lists as recipients, you can configure the rules per list. If you only want to show a block to subscribers from one specific list, simply hide it for the other lists:

You will see all the lists for this campaign, showing whether any rules apply per list and whether the block is hidden. Click ‘Configure’ next to a list.

The Conditional content pop-up with a table of three lists, with the Rules and Hidden? columns still empty and the Configure link next to each list, circled in red for Donors

At the top of the pop-up, click ‘Hide block for this list’.

The same pop-up for the chosen list Donors, with the links Choose another list and Hide block for this list (circled in red) at the top, and one rule with a field and a comparison below

Repeat this for each list. The block is now hidden for two of the three lists, so only subscribers from the Member newsletter list will see it.

The same overview of three lists, now with a crossed-out eye icon in the Hidden? column for Donors and Events, and not for Member newsletter

Which fields and conditions you can use

You can use all the fields from your list for your conditions. Which comparisons you can choose depends on the field type:

TypePossible conditions
Text fieldis equal or not equal to a value, starts or ends with a value, does or does not contain a value, is or is not empty
Numeric fieldthe same conditions as a text field, plus greater than, less than or equal to a value
Date fieldis equal or not equal to a value, is before or after a value
Multiple-choice fielddoes or does not contain a specific option

Checking and editing conditional content

As soon as a block has a condition, the ‘Conditional content’ icon turns yellow. Click it again to add to, edit or delete the conditions.

In the ‘Preview’ of your campaign, you will see the full newsletter, with a label showing the number of rules next to each conditional block. Click that label to view the rules.

The '1 rule' label next to a text block in the preview, circled in red

If you want to view the newsletter without these labels, select ‘Hide conditional content’ in the preview screen or in step 5 (Last check).

In Examples of conditional content, you will find two detailed examples: a local council that shows different text for each postcode area, and a school that only emails parents about their own child’s year group.