0

I use content areas pretty extensively in Sender Profiles for dynamic from name and from email values. When using these content ares in my sender profile, I use the following AMPscript:

%%=TreatAsContent(ContentArea(xxxxxx))=%%

It's an HTML content area which is referencing a Content Builder HTML content block.

%%=ContentBlockByID()=%%

However, I notice when sending test emails my From Name and From Email is being wrapped! Similar to: SFMC wrapping Content Blocks with DIV

So now instead of a nice clean From Name, it comes across in my inbox as:

<div data-marker=wrapper style= class=stylingblock-content-wrapper></div>[Dynamic From Name]
  • what kind of content area is your script held in? Is it HTML? – Gortonington Mar 6 '18 at 16:19
  • also can you post a sample of your script? The div does not appear to be wrapping around the content, but in front of it. Perhaps there is something in your script that is causing this div. – Gortonington Mar 6 '18 at 16:21
  • I failed to mention that the content area is referencing a Content Builder content block using the function ContentBlockByID() – Daniel Mar 10 '18 at 1:11
0

Answer from SFMC support:

The TreatAsContent will pull a defined ContentArea in and that is referencing the Content Block so Content Builder will automatically add the div code as that is part of the way the Content Builder app works when it builds out content blocks. The div tags have always been added in this way. The Product Team has no plans to alter this functionality at this time.

  • Per a comment in the "ideas" section by Donald Owen: "...In the meantime, you can use a code snippet that way. They can be referenced by the AMPscript contentblock functions, but they don't get the wrapper." – Daniel Mar 24 '18 at 20:06
  • Turns out this does not actually work - pulling in a code snippet using the contentblock functions still wraps the content but in HTML comment tags rather than <div> – Daniel Jun 30 '18 at 14:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.