Answers.Body: <p>You can find some information about overriding templates and the Custom Template Directory in the developer guide <a href="https://docs.civicrm.org/dev/en/latest/framework/templates/customizing/" rel="nofollow noreferrer">here</a>... along with the recommendation that you don't do that but use extensions instead.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-03-27T14:23:42.160Z
Answers.LastActivityDate: 2018-03-27T14:23:42.160Z
Answers.UserDisplayName: Aidan
Answers.Body: <p>Just elaborate Aidan's answer:</p>
  
  <p>At Administration Console, Directories, at field: Custom Template Directory, fill in say:
  <code>[civicrm.files]/custom_templates/</code></p>
  
  <p>It refers to directory <code>&lt;DocRoot&gt;/sites/default/files/civicrm/custom_templates</code>
  Go there and make any necessary directory structure corresponding to your include statement. If it is {include file="CRM/Report/Form.tpl"}, then mkdir -p CRM/Report and put Form.tpl there. It would be used if there is a hit.</p>
  
  <p>In case you feel the tpl file you put there is not used, please try this: Administer, System Settings, Cleanup Caches and Update Paths, just click Cleanup Caches. Then go to Dashboard and click Refresh Dashboard Data. Then visit your custom component and see the new changes.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-11-01T02:28:26.373Z
Answers.LastActivityDate: 2019-11-01T02:28:26.373Z
Answers.UserDisplayName: user9611631
Body: <p>I'm sure this is easy but the answer has escaped me. On a drupal install CiviCRM is installed at:
  <code>/webtree/mysite/htdocs/sites/www.mysite/modules/civicrm</code></p>
  
  <p>I have a Custom Template File directory set to 
  <code>/webtree/mysite/htdocs/sites/www.mysite/files/civicrm/templates</code></p>
  
  <p>I'd like to store a custom template file "someText.tpl" in the Custom Template File directory that, depending on some logic, may get included in the Online Event Registration system workflow message using the command:</p>
  
  <p><code>{include file="someText.tpl"}</code></p>
  
  <p>If I place the file at: 
  <code>/webtree/mysite/htdocs/sites/www.mysite/modules/civicrm/templates/someText.tpl</code>
  it is read just fine, but I haven't been able to find a way to place it at 
  <code>/webtree/mysite/htdocs/sites/www.mysite/files/civicrm/templates</code></p>
  
  <p>I've tried assorted dot notation, full paths, etc. but can't seem to read and include a template that isn't in the module/civicrm/templates path. I'd rather not store my custom files there because it creates extra steps during upgrades.  Any suggestions?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-03-26T20:57:40.737Z
Comments.Text: In your second last paragraph, both paths are the same. Maybe the first should point to the module template path.
Comments.UserDisplayName: Kainuk - CiviCooP
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-03-26T21:43:42.603Z
Comments.Text: If you look close they're a little different, the first is INSIDE the default install location for CiviCRM (sites/mysite/MODULES/civicrm.. while the second is outside that location (sites/mysite/FILES/...UPDATE You're right, I typed it wrong. edited now.
Comments.UserDisplayName: Jeff Wood
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-03-27T18:34:26.833Z
Comments.Text: Are your Directories and Resource URLs correctly set?
Comments.UserDisplayName: petednz - fuzion
Tags: <civievent><message-templates><smarty><system-workflow-messages>
Title: Search Custom Template Directory first when using Smarty {include}
ThreadText: # Search Custom Template Directory first when using Smarty {include}
  
  (Asked by: username_0 on 2018-03-26)
  
  I'm sure this is easy but the answer has escaped me. On a drupal install CiviCRM is installed at:
  `/webtree/mysite/htdocs/sites/www.mysite/modules/civicrm`
  
  I have a Custom Template File directory set to
  `/webtree/mysite/htdocs/sites/www.mysite/files/civicrm/templates`
  
  I'd like to store a custom template file "someText.tpl" in the Custom Template File directory that, depending on some logic, may get included in the Online Event Registration system workflow message using the command:
  
  `{include file="someText.tpl"}`
  
  If I place the file at:
  `/webtree/mysite/htdocs/sites/www.mysite/modules/civicrm/templates/someText.tpl`
  it is read just fine, but I haven't been able to find a way to place it at
  `/webtree/mysite/htdocs/sites/www.mysite/files/civicrm/templates`
  
  I've tried assorted dot notation, full paths, etc. but can't seem to read and include a template that isn't in the module/civicrm/templates path. I'd rather not store my custom files there because it creates extra steps during upgrades. Any suggestions?
  
  **Tags:** civievent, message-templates, smarty, system-workflow-messages
  
  > **Comments:**
  > **username_1**: In your second last paragraph, both paths are the same. Maybe the first should point to the module template path.  
  > **username_0**: If you look close they're a little different, the first is INSIDE the default install location for CiviCRM (sites/mysite/MODULES/civicrm.. while the second is outside that location (sites/mysite/FILES/...UPDATE You're right, I typed it wrong. edited now.  
  > **username_2**: Are your Directories and Resource URLs correctly set?  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_3 on 2018-03-27. Score: 1
  
  You can find some information about overriding templates and the Custom Template Directory in the developer guide [here](https://docs.civicrm.org/dev/en/latest/framework/templates/customizing/)... along with the recommendation that you don't do that but use extensions instead.
  
  
  ---
  
  ### Answer by username_4 on 2019-11-01. Score: 1
  
  Just elaborate username_3's answer:
  
  At Administration Console, Directories, at field: Custom Template Directory, fill in say:
  `[civicrm.files]/custom_templates/`
  
  It refers to directory `<DocRoot>/sites/default/files/civicrm/custom_templates`
  Go there and make any necessary directory structure corresponding to your include statement. If it is {include file="CRM/Report/Form.tpl"}, then mkdir -p CRM/Report and put Form.tpl there. It would be used if there is a hit.
  
  In case you feel the tpl file you put there is not used, please try this: Administer, System Settings, Cleanup Caches and Update Paths, just click Cleanup Caches. Then go to Dashboard and click Refresh Dashboard Data. Then visit your custom component and see the new changes.
  
  
  ---
  
  