{* * This file gets included in various Smarty templates of source and action editors. * Provides a common editor for email templates. * * Expects parameters: * - template: required * - input_name: required * - variables: optional * - to_name: optional * - to_value: optional * - sourcefrom_name: optional * - sourcefrom_set: optional * - cheat_sheet: optional * - cheat_sheet_key: optional * - site_app_url: optional *} {$input_name = ifset($input_name, '')} {* Split template into parts *} {$template = ifset($template, '')} {$parts = explode('{SEPARATOR}', $template, 3)} {$body = array_pop($parts)} {$subject = array_pop($parts)} {$from = array_pop($parts)} {$uniqid = uniqid('t')} {function message_to_variant_li variant=''} {$variants = $message_to_variants}
  • {/function}
    {if !empty($to_name)}
    [`To`]
    {/if}
    [`Subject`]
    [`Text`]
    {if !empty($variables)} {/if} {if !empty($add_attachments_name)}
    {/if}