Body: <p>I'm wondering if it's possible to add some conditional logic in my custom user-driven message template to show some content (in this case, a footer) for messages that are sent as emails, but not to show the content if the message is generated as a PDF.</p>
  
  <p>My use case is for generating thank-you letters for contributions. If I select <strong>"generate emails where possible/generate PDFs for contacts who cannot receive email,"</strong> I want the emails to contain a footer, but I don't want the PDFs to contain the footer, since the footer is already part of stationery that we have.</p>
  
  <p>Is this possible in some way with CiviCRM, or do the email and PDF templates currently have to be identical?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-10-12T20:02:43.113Z
Comments.Text: Can you please clarify that you're referring to System Workflow message templates?  There are multiple templating systems in CiviCRM.
Comments.UserDisplayName: Jon G - Megaphone Tech
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-10-12T20:09:40.357Z
Comments.Text: @JonG-MegaphoneTech - sorry; I am referring to a custom message template I created under "User-driven Messages."
Comments.UserDisplayName: Nick Tiberi
Tags: <email><message-templates><pdf><smarty>
Title: Adding conditional content in message template for emails, but not for PDFs
ThreadText: # Adding conditional content in message template for emails, but not for PDFs
  
  (Asked by: username_0 on 2019-10-12)
  
  I'm wondering if it's possible to add some conditional logic in my custom user-driven message template to show some content (in this case, a footer) for messages that are sent as emails, but not to show the content if the message is generated as a PDF.
  
  My use case is for generating thank-you letters for contributions. If I select **"generate emails where possible/generate PDFs for contacts who cannot receive email,"** I want the emails to contain a footer, but I don't want the PDFs to contain the footer, since the footer is already part of stationery that we have.
  
  Is this possible in some way with CiviCRM, or do the email and PDF templates currently have to be identical?
  
  **Tags:** email, message-templates, pdf, smarty
  
  > **Comments:**
  > **username_1**: Can you please clarify that you're referring to System Workflow message templates?  There are multiple templating systems in CiviCRM.  
  > **username_0**: @username_1 - sorry; I am referring to a custom message template I created under "User-driven Messages."  
  
  ---
  
  ## 0 answers
  
  