near the bottom of our _i/notifications/email_template.html is this:
<xphp var="body"/>
<xphp var="footer"/>
I know that var=“body” displays whatever is in the appropriate body.html - for example, if I am sending out a confirmation for a public submission, the file public_submission_confirmation_body.html will be used. Likewise, further up in the template <xphp var="subject"/> will display public_submission_confirmation_subject.html.
However, I cannot figure out what is displayed by the other two lines of code in the template. Creating files for public_submission_confirmation_header.html and public_submission_confirmation_footer.html had no effect. Likewise with email_footer.html and email_header.html. I also thought perhaps the values in $GLOBALS[‘LIVEWHALE_CONFIG’][‘EMAIL_HEADER’] and $GLOBALS[‘LIVEWHALE_CONFIG’][‘EMAIL_FOOTER’] would be used, but those do not show either.
I know that I can just put something specific in the template in place of
<xphp var="header"/>
<xphp var="footer"/>
but am interested to know how it is supposed to work.
additional info: I see in rereading the docs this:
header (the contents of $_LW->CONFIG['EMAIL_HEADER'], for backwards-compatibility)
footer (the contents of $_LW->CONFIG['EMAIL_FOOTER'], for backwards-compatibility)
but we don’t have those in our config.
Does that mean that the xphp quoted above is just in the template for compatibility with older installations, and that I SHOULD just replace those calls with the content I want to use in the main email template?
Yes, it looks like those were a legacy syntax for setting things like this in the PHP config files:
// Set the default header and footer copy for all notification emails. Use %recipient% in place of the recipient's name (i.e. "Hi, %recipient%!")
$GLOBALS['LIVEWHALE_CONFIG']['EMAIL_HEADER']="Hi %recipient%,";
$GLOBALS['LIVEWHALE_CONFIG']['EMAIL_FOOTER']="Have a great day!\n\nLiveWhale\nCalifornia's friendliest content management system\nwww.livewhale.net";
That being said, the current .html notification template customization (including what you can do in the master email_template.html) is far more robust than that, so I’d probably advocate for deleting those XPHP variables from the template and just using whatever you want in their place. We only kept them in the core versions of that template for backwards-compatibility. Thanks!