我收到错误说"错误:语法错误。缺少' =' " 看起来我做得对,但我知道这是错的。我试图做一个IF语句来确定放在主题行中的内容。任何帮助将不胜感激。
<messaging:emailTemplate subject="{!if(relatedTo.Event_Session__r.Needs_Encryption__c = true, [encrypt] {!relatedTo.Event_Session__r.Name} {!relatedTo.Action__c} Confirmation for {!relatedTo.Event_Session__r.Event__r.Sponsoring_Facility__r.Name},{!relatedTo.Event_Session__r.Name} {!relatedTo.Action__c} Confirmation for {!relatedTo.Event_Session__r.Event__r.Sponsoring_Facility__r.Name})}" recipientType="Contact" relatedToType="Enrollment__c" >
<messaging:HTMLEmailBody >
<c:RenderAccountLogoInEmail accountID="{!relatedTo.Event_Session__r.Event__r.Sponsoring_Facility__c}"/>
<c:EnrollmentConfirmationLetter medium="Email" enrollmentRecord="{!relatedTo}" enrollId="{!relatedTo.Id}"/>
</messaging:HTMLEmailBody>