Answers.Body: <p>As I learned <a href="https://civicrm.stackexchange.com/questions/321/adding-a-facebook-conversion-pixel-code-to-the-contribution-confirmation-screen">from @Nicholai in a previous (unrelated) thread</a>, you can override these templates with some pretty easy logic to add something custom to a single page. For example:</p>
  <blockquote>
  <p>{if $contributionPageID == 20}</p>
  <pre><code>{* whatever you need to do on this page *}
  </code></pre>
  <p>{/if}</p>
  </blockquote>
  <p>I assume this would work in this case, too. If you try it and it works, let us know!</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-06-29T05:16:28.590Z
Answers.Text: don't you need an {else} eg {if $contributionPageID == 20} DO THIS {else} DO THAT {/if} - i guess you don't if what you are saying for PageID==20 is in addition ;-)
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-06-29T12:14:19.233Z
Answers.Text: Sounds about right!
Answers.UserDisplayName: Laryn
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-01-21T18:04:17.853Z
Answers.Text: Can I use this for the message template subject line, so I could have unique subject lines for each contribution form I have? Like this: {if $contributionPageID == 20} {ts 1=$title}Event Registration Receipt: %1{/ts}
  {elseif $contributionPageID == 21} {ts 1=$title}Membership Receipt: %1{/ts}
  {elseif $contributionPageID == 2} {ts 1=$title}Receipt for item purchase: %1{/ts}
  {else} {ts 1=$title}Generic: %1{/ts}
  {/if}
Answers.UserDisplayName: A. Block
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-01-22T03:50:33.543Z
Answers.Text: @A.Block yes.  However, you're likely better off using CiviRules to manage your receipts instead.
Answers.UserDisplayName: Jon G - Megaphone Tech
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-01-22T19:16:38.637Z
Answers.Text: civiRules sounds interesting. I've installed the extension, and I can see how to set a rule for when a specific contribution form is used, but how do I use it to change the subject line of the receipt message template?
Answers.UserDisplayName: A. Block
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-08-28T19:26:16.710Z
Answers.Text: Wondering if anyone has an example of how to use civiRules to customize the subject line of the receipt (on/offline) system message?
Answers.UserDisplayName: A. Block
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-04-22T15:49:33.037Z
Answers.LastActivityDate: 2015-04-22T15:49:33.037Z
Answers.LastEditDate: 2020-06-17T09:00:50.810Z
Answers.UserDisplayName: Laryn
Body: <p>I need to create a custom system workflow message for </p>
  
  <pre><code>Contributions - Receipt (on-line)
  </code></pre>
  
  <p>that will be used instead of the default template when a particular contribution page is used.</p>
  
  <p>I already know about the <code>Receipt</code> tab of the contribution page wizard. There I can prepend text to the receipt that is unique to that contribution page.</p>
  
  <p>But I need to fuss with the template itself. I  know about the System Workflow Messages at: <code>civicrm/admin/messageTemplates</code>. The problem there is that the change applies to all contribution receipts. I'm looking to change the template only for a particular contribution page.</p>
  
  <p>I'm using CiviCRM 4.5.8 on Drupal 7.36.</p>
  
  <p>Thanks.</p>
  
Tags: <receipts><smarty><custom-templates><system-workflow-messages>
Title: Can I create a custom System Workflow Message for a particular Contribution Page?
ThreadText: # Can I create a custom System Workflow Message for a particular Contribution Page?
  
  (Asked by: username_0 on 2015-04-21)
  
  I need to create a custom system workflow message for 
  Contributions - Receipt (on-line)
  
  that will be used instead of the default template when a particular contribution page is used.
  I already know about the Receipt tab of the contribution page wizard. There I can prepend text to the receipt that is unique to that contribution page.
  But I need to fuss with the template itself. I  know about the System Workflow Messages at: civicrm/admin/messageTemplates. The problem there is that the change applies to all contribution receipts. I'm looking to change the template only for a particular contribution page.
  I'm using CiviCRM 4.5.8 on Drupal 7.36.
  Thanks.
  
  **Tags:** receipts, smarty, custom-templates, system-workflow-messages
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2015-04-22. Score: 7 | Accepted answer
  
  As I learned from @Nicholai in a previous (unrelated) thread, you can override these templates with some pretty easy logic to add something custom to a single page. For example:
  
  {if $contributionPageID == 20}
  {* whatever you need to do on this page *}
  
  {/if}
  
  I assume this would work in this case, too. If you try it and it works, let us know!
  
  > **Comments:**
  > **username_2**: don't you need an {else} eg {if $contributionPageID == 20} DO THIS {else} DO THAT {/if} - i guess you don't if what you are saying for PageID==20 is in addition ;-)  
  > **username_1**: Sounds about right!  
  > **username_3**: Can I use this for the message template subject line, so I could have unique subject lines for each contribution form I have? Like this: {if $contributionPageID == 20} {ts 1=$title}Event Registration Receipt: %1{/ts} {elseif $contributionPageID == 21} {ts 1=$title}Membership Receipt: %1{/ts} {elseif $contributionPageID == 2} {ts 1=$title}Receipt for item purchase: %1{/ts} {else} {ts 1=$title}Generic: %1{/ts} {/if}  
  > **username_4**: @A.Block yes.  However, you're likely better off using CiviRules to manage your receipts instead.  
  > **username_3**: civiRules sounds interesting. I've installed the extension, and I can see how to set a rule for when a specific contribution form is used, but how do I use it to change the subject line of the receipt message template?  
  > **username_3**: Wondering if anyone has an example of how to use civiRules to customize the subject line of the receipt (on/offline) system message?  
  
  ---
  
  