Change Social Content Slots if Viewed As A Webpage

These examples require familiarity with HTML, Paste HTML Emails, and AMPscript.

Use AMPscript to determine whether the email displayed as a webpage. If a webpage is used to display the content, the AMPscript shown below displays the text contained in the code block.

Sample AMPscript

Sample Paste HTML

Use this code to share a social content slot.

Use this code to share the longer webpage version of the content instead of the shorter email version.

Sample AMPscript

If the message is viewed as a webpage or shared, the AMPscript displays the longer text included in the code block. You can separate the _MessageContext checks into two different If statements if you want to change how each context displays your content.

Sample Paste HTML Email

This email uses AMPscript to change the displayed content depending on whether the email is being displayed in an inbox or as a webpage. The content shared is always the content from the email view.