How to create dynamic content? | Community
Skip to main content
ccg1706
Community Advisor
Community Advisor
January 12, 2023
Solved

How to create dynamic content?

  • January 12, 2023
  • 1 reply
  • 1461 views

Hello!

 

I want to create dynamic content with different structures. For one business unit show one photo and two buttons and for another business unit two photos and one button.

 

In understand that this has to be made using personalization blocks but it could be done inserting conditional content.

 

Thanks for your help!

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by CedricRey

Hi @ccg1706 

What do you mean by "conditional content" ?

You can use the personalisation syntax to generate content according the message datas :

<% switch( recipient.field1.toString()){ case "CASE1" : %> <p>My content CASE1</p><img src="...pic1.jpg"/> <% break; case "CASE2" : %> <p>My content CASE2</p><img src="...pic2.jpg"/> <% break; default : %> <p>My content default</p><img src="...picDefault.jpg"/> <%}%>

 

You can also choose to make 2 differents delivery models, if you can split your target in a workflow, then send those 2 differents deliveries with an upstream targeting workflow. It depends of the complexity in the difference between your 2 business cases.

 

Also, you can use the content management module to build complex delivery content : https://experienceleague.adobe.com/docs/campaign-classic/using/sending-messages/content-management/about-content-management.html?lang=en

It's more difficult to handle (you have to master XSL or JST) but can achieve great things.

Cedric

1 reply

CedricRey
CedricReyAccepted solution
Level 5
January 12, 2023

Hi @ccg1706 

What do you mean by "conditional content" ?

You can use the personalisation syntax to generate content according the message datas :

<% switch( recipient.field1.toString()){ case "CASE1" : %> <p>My content CASE1</p><img src="...pic1.jpg"/> <% break; case "CASE2" : %> <p>My content CASE2</p><img src="...pic2.jpg"/> <% break; default : %> <p>My content default</p><img src="...picDefault.jpg"/> <%}%>

 

You can also choose to make 2 differents delivery models, if you can split your target in a workflow, then send those 2 differents deliveries with an upstream targeting workflow. It depends of the complexity in the difference between your 2 business cases.

 

Also, you can use the content management module to build complex delivery content : https://experienceleague.adobe.com/docs/campaign-classic/using/sending-messages/content-management/about-content-management.html?lang=en

It's more difficult to handle (you have to master XSL or JST) but can achieve great things.

Cedric

ccg1706
Community Advisor
ccg1706Community AdvisorAuthor
Community Advisor
January 12, 2023

Hi Cedric!

 

Thanks for your quick response, by conditional content I meant to apply this.

<%

if(recipient.data=='condiiton'){

%>

<%

}

else{

%>

But having your two proposals I'm going to try doing it that way.

Thanks for your help!

 

david--garcia
Level 10
January 13, 2023

Cedric's answer is correct, a switch case statement is an alternative  way to handle 'IF' conditions based on cases.

 

More info.

https://dev.to/sumusiriwardana/if-else-or-switch-case-which-one-to-pick-4p3h