The most common editable elements of any email are its text and images (which can also have associated links).
Text:
For text, only replace the text (not the div, span, etc.). For example:
<div style="line-height:24px;color:#787878">
{% rich_text "Post 2 Description" label="Post 2 Description" %}
</div>
Images:
For images, replace the whole <img> string. Copy any styling into the tag, comma separated. For example:
{% linked_image "Product Image" label="Product Image", width="264", height="192" %}
Logo:
Enter the following code wherever your site logo would be. This is a conditional statement, so that if your HubSpot CMS pages have a custom header, you'll be able to add your logo as an image to each email.
{% if linked_logo %}
{{ linked_logo }}
{% else %}
{% linked_image "logo" label="Logo", default_src="http://static.hubspot.com/final/img/content/email-template-images/placeholder_200x75.png", target="_blank", align="left" %}
{% endif %}
Code to add to generate email preview:
Used to properly render the initial part of the main body content in email clients that generate preview text.
<img id="hubspot-email-hidden-img" alt="{{ content.body.emailbody|striptags|truncate(100, false) }}" src="http://static.hubspot.com/img/trackers/blank001.gif" style="display: none!important; visibility: hidden; margin: 0px; padding: 0px;" width="1" height="1"/>
Comply with CAN SPAM rules:
Replace the CAN SPAM section of your purchased template (the paragraph that will contain your company name, company address, unsubscribe link, etc. with the following code:
<p style="font-family: Geneva, Verdana, Arial, Helvetica, sans-serif; text-align: center; font-size: 9px; line-height: 1.34em; color: #999; display: block;">©{{ eastern_dt.year }} {{ site_settings.company_name }} {{ site_settings.company_street_address_1 }} {{ site_settings.company_street_address_2 }} {{ site_settings.company_city }} {{ site_settings.company_state }} {{ site_settings.company_zip }} {{ site_settings.company_country }}
<br/>
{{ unsubscribe_section }}.
</p>