我正在尝试向电子邮件添加动态内容,并希望从电子邮件正文中删除速度语法,并使用如下 #set 指令将其替换为 $var:
#if('x' = 'y') #set($z = 'z') #elseif( 'a' = 'b') #set($c = 'c')
这是我的尝试:
#if( {$date_opened_5ca62c21c455a} == "" && {$firstName} != "" )
#set($header_greeting = "{$firstName}, Community Member.")
#elseif( {$date_opened_5ca62c21c455a} != "" && {$firstName} != "" )
#set( $header_greeting = "{$firstName}, member since
{$date_opened_5ca62c21c455a}")
#else
#set( $header_greeting = "Building Tomorrow Together" )
#end
我收到一个错误,说应该关闭)
我还在黑暗中拍摄了一张照片:
#set( $header_greeting = "#if( {$date_opened_5ca62c21c455a} == "" && {$firstName} != "" ){$firstName}, Community Member.#{elseif({$date_opened_5ca62c21c455a} != "" && {$firstName} != "")}{$firstName}, member since {$date_opened_5ca62c21c455a}#{else}Building Tomorrow Together#end" )