Expand my Community achievements bar.

Dive in, experiment, and see how our AI Assistant Content Accelerator can transform your workflows with personalized, efficient content solutions through our newly designed playground experience.
SOLVED

Fragment customization

Avatar

Level 2

Hello!

I am trying to create a fragment which can be customized in the content section.

Use case is: User should be able to customize the color of CTA button, change the background color, highlight text with color.

I could not find any related document or example on this. Please help.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

You will have to use the break inheritance approach to make the changes on the existing fragment and use that as a standalone within that email. Follow this break inheritance approach. Essentially you will have to add the fragment into the email designer after adding click on the personalization that will open the fragment id. Then select the fragment associated with that and copy that code in the editor to make changes to styles and save them.  

 

Thanks, Sathees

View solution in original post

5 Replies

Avatar

Community Advisor

@DBoro Take a look at this documentation.

Thanks, Sathees

Avatar

Level 2

Hi Satheeskannak!
I tried to to write the following code to make the color customizable in the content; but this is giving me error while saving/simulating it.

 

{{fragment id='ajo:b299bf66-84d9-4da9-be9e-7ea5a82e9323' mode='inline' var='<a style="display: block; height: 100px; width: 500px; background: #606060; color: #33ff77; text-align: center; font-weight: bold; font-size: 300%; line-height: 100px; font-family: Arial; border-radius: 20px; text-decoration: none;" href="https://www.google.com/">Sign up!</a>'}}

 

Bellow is the error

DBoro_0-1727160957712.png

 

Avatar

Community Advisor

@DBoro I created a fragment with this HTML code and used that on the email designer (screenshot2) then sent out a proof. 

SatheeskannaK_0-1727185350975.png

SatheeskannaK_1-1727185428014.png

Received proof with this content,

SatheeskannaK_2-1727185503288.png

 

Thanks, Sathees

Avatar

Level 2

Hi @SatheeskannaK
That fragment works if I directly put the fragment in the email without customization; but my question was different.

 

I created a customizable fragment as below screenshot_1:

screenshot_1:

DBoro_0-1727243867990.png

Then, if I use above fragment in the email(screenshot_2) and want to change the 'color:#de3a2f' from 'color: #33ff77'  this is not allowing me to save/simulate and hence can't send proof or publish the journey.

screenshot_2:

DBoro_1-1727244318129.png

Below is the error:

DBoro_2-1727244414811.png

Error is not just on color property, it's on any property customization.

Hope this will give more clarity.

 

Thanks,

Duleswar Boro

 

Avatar

Correct answer by
Community Advisor

You will have to use the break inheritance approach to make the changes on the existing fragment and use that as a standalone within that email. Follow this break inheritance approach. Essentially you will have to add the fragment into the email designer after adding click on the personalization that will open the fragment id. Then select the fragment associated with that and copy that code in the editor to make changes to styles and save them.  

 

Thanks, Sathees