Developer & API Support
Reply
New Member
Posts: 2
Registered: ‎09-13-2010

Editing an Email Template using Code View

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';


 

CTCT Employee
Posts: 512
Registered: ‎06-04-2009

Re: Editing an Email Template using Code View

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: 


<img src="


 


Custom Field 2:


http://dyyo.com/img/analysis_registration.gif


 


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.

David J

New Member
Posts: 2
Registered: ‎09-13-2010

Re: Editing an Email Template using Code View

Hi David,


Thanks for the reply! This would definitely work!


Regards,


Andreau