Calling All Developers
Connect with fellow code ninjas in the Constant Contact Community.
09-28-2010 03:45 AM
I would like to insert a dynamic html <img> tag in my 'Email Template' using 'Code View'.
Is there a way to set the value of the 'img src' with the text value that is stored in Contact Custom Text 1?
Say for example the value of Contact Custom Text 1 = 'http://dyyo.com/img/analysis_registration.gif';
09-28-2010 09:56 AM
You can do this using custom fields. This must be done in an XHTML email (as opposed to HTML). The easiest way to do this would be to string a few custom fields together that will create he full image tag, for example:
Custom Field 1:
Custom Field 2:
Custom Field 3:
Then you would string these together in your XHTML email on one line such as:
<Property name="Subscriber.CustomText1" /><Property name="Subscriber.CustomText2" /><Property name="Subscriber.CustomText3" />
Once you have sent the email, all of these custom fields will be turned into their values for that particular contact, thus creating your dynamic image. You can find more information about inserting custom details into an XHTML email in this faq. I hope this helps. Please let us know if you have any further questions. Thank you.