You need to sign in to do that
Don't have an account?
asapjim
conditional br tag in visual force email template
Hi I am conditionally trying to add a br tag to a visual force email template, and I can't get around the html encoding.
I'm trying to avoid blank lines in an address block, so if optional address elements are not present i don't want to insert a break.
Here's what I am trying to do
{!relatedTo.Shipping_Address_2__c}{!if(relatedTo.Shipping_Address_2__c =='','','<br />')}
I've tried using HTMLENCODE around br tag but I still come up with <
Is there a better way to approach this? I'm sure this a fairly common requirement.
Thanks!
Hi You can use <apex:outputText/> tag to insert a break
Try the following way: