Expand my Community achievements bar.

We are excited to introduce our latest innovation to enhance the Adobe Campaign user experience — the Adobe Campaign v8 Web User Interface!

Content blocks

Avatar

Level 2

Hi all,

I am wondering if it is possible to refer to a content block inside a content block. Maybe as a merge field.

I am using the content block as placeholder for different language variants on a landing page, but within the different languages we also have different contact emails and phone numbers. They are already in another content block, and is based on sales companies, so what I want is to refer to them in the content block with the text for the landing page.

Does anyone know if that is possible?

Thank you ind advance

Best regards

Sebastian

3 Replies

Avatar

Level 5

Hello,

I have tried adding it, it didn't work for me.

When you add any content block, email html will have a tag added something like this for content block named "aa test"

<span class="acr-block nl-dce-fragment" data-nl-label="aa test (CFRG6)" data-nl-name="CFRG6" contenteditable="false">aa test</span>

Email content does not show the actual html of content block which is as follows in my case-

<p>Test content</P>

I tried adding another content block html  to above one like this-

<p>Test content</p><span class="acr-block nl-dce-fragment" data-nl-label="aa test (CFRG8)" data-nl-name="CFRG8" contenteditable="false">Test B</span>

and when previewed, shown as  "Test Content Test B" , it appended the name of content block instead of actual text which is "<p>Test content B</p>" in my case.

Thanks!

Avatar

Level 2

Hi,

Thank you for your input. I tried the same. Copying the HTML code from an email, related to the content block into the other content block, but it just show the name of the block, as in your case...

I hope someone have succeeded with this problem.

Thank you

Avatar

Level 1

I know this is probably just for documentation and for whom ever it will help having the same problem.

You can do by using this syntax to call a fragment within a content block.

 

 

<%


if(context.targetData.brand == 'hello')

{%>
<%@include contentModelFragment='CMDL534' %>
<%}


else if(context.targetData.brand == 'world')

{%>
<%@include contentModelFragment='World_10' %>
<%}

else if(context.targetData.brand == 'working')

{%>
<%@include contentModelFragment='working_01' %>
<%}

%>

 

 
The "context.targetData.brand" is defined in a workflow, as "@brand". 
The contentModelFragment="internal Id of the fragment needed"
So in this case depending on what fragment you need, you can regulate this in the workflows value of the "@brand" variables value. If "@brand = hello",  this content block will pick fragment with internal id of "CMDL534". 

In addition if you have any links in the fragments these will be seen in the tracking table of the delivery where you have the content block. So if each fragment in this case included a link, all 3 links will be present in the tracking table of the delivery - quite neat.