Answers.Body: <p>A bit of terminology: Components in CiviCRM usually means CiviContribute, CiviEvent, CiviMembership, etc. I think you are referring to parts of an email template when you write about components. In general, when you are wanting to add something to the database in CiviCRM as part of the core code, you need to make sure it is added to the install tarball and is added or changed in databases as they are upgraded. </p>
  
  <p>To insert data in the tarball, look under <a href="https://github.com/civicrm/civicrm-core/tree/master/xml/templates" rel="nofollow">https://github.com/civicrm/civicrm-core/tree/master/xml/templates</a> - in your case you likely want to add or update templates in <a href="https://github.com/civicrm/civicrm-core/tree/master/xml/templates/message_templates" rel="nofollow">https://github.com/civicrm/civicrm-core/tree/master/xml/templates/message_templates</a></p>
  
  <p>To insert or modify data on upgrade, look at <a href="https://github.com/civicrm/civicrm-core/tree/master/CRM/Upgrade" rel="nofollow">https://github.com/civicrm/civicrm-core/tree/master/CRM/Upgrade</a>. Note that the message templates are in subdirectories by release, and that non-message template insertions are generally in the per release upgrade scripts in <a href="https://github.com/civicrm/civicrm-core/tree/master/CRM/Upgrade/Incremental/sql" rel="nofollow">https://github.com/civicrm/civicrm-core/tree/master/CRM/Upgrade/Incremental/sql</a> </p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-06-13T20:34:02.983Z
Answers.LastActivityDate: 2016-06-13T20:34:02.983Z
Answers.UserDisplayName: Joe Murray
Body: <p>I have been working on to add a default header and footer to the system workflow emails. Most of the part is done but I am stuck at setting those components in the database by default so that whenever a new user installs civicrm, get the new transactional_header and footer along with other components as well.<br>
  I have for now trying updated the .tpl files for the mysql in civicrm/templates/civicrm_msg_templates.tpl<br>
  I tried resetting the database to see the changes but its not there.
  Do we have any documentation or we need to make changes somewhere else also?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-06-13T08:35:43.617Z
Comments.Text: I guess you are trying to change the core features which is not a good practices - so please try to create an extension and do all your changes in the extension - which will help you in upgrade too -
Comments.UserDisplayName: Ramesh - ARTECH Consultancy
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-06-13T08:37:26.363Z
Comments.Text: if you still wanted to override the core - in your question you have just changed the .tpl but you need to change the civicrm_message.tpl table too - I guess
Comments.UserDisplayName: Ramesh - ARTECH Consultancy
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-06-13T20:52:35.467Z
Comments.Text: @Ramesh - thank you for the suggestion. I am a new member of civicrm and would surely discuss this with my mentor.
Comments.UserDisplayName: Anjali Ujjainia
Tags: <civimail><database><gsoc>
Title: Adding new default components to the database
ThreadText: # Adding new default components to the database
  
  (Asked by: username_0 on 2016-06-12)
  
  I have been working on to add a default header and footer to the system workflow emails. Most of the part is done but I am stuck at setting those components in the database by default so that whenever a new user installs civicrm, get the new transactional\_header and footer along with other components as well.  
  I have for now trying updated the .tpl files for the mysql in civicrm/templates/civicrm\_msg\_templates.tpl  
  I tried resetting the database to see the changes but its not there.
  Do we have any documentation or we need to make changes somewhere else also?
  
  **Tags:** civimail, database, gsoc
  
  > **Comments:**
  > **username_1**: I guess you are trying to change the core features which is not a good practices - so please try to create an extension and do all your changes in the extension - which will help you in upgrade too -  
  > **username_1**: if you still wanted to override the core - in your question you have just changed the .tpl but you need to change the civicrm_message.tpl table too - I guess  
  > **username_0**: @username_1 - thank you for the suggestion. I am a new member of civicrm and would surely discuss this with my mentor.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2016-06-13. Score: 1
  
  A bit of terminology: Components in CiviCRM usually means CiviContribute, CiviEvent, CiviMembership, etc. I think you are referring to parts of an email template when you write about components. In general, when you are wanting to add something to the database in CiviCRM as part of the core code, you need to make sure it is added to the install tarball and is added or changed in databases as they are upgraded.
  
  To insert data in the tarball, look under <https://github.com/civicrm/civicrm-core/tree/master/xml/templates> - in your case you likely want to add or update templates in <https://github.com/civicrm/civicrm-core/tree/master/xml/templates/message_templates>
  
  To insert or modify data on upgrade, look at <https://github.com/civicrm/civicrm-core/tree/master/CRM/Upgrade>. Note that the message templates are in subdirectories by release, and that non-message template insertions are generally in the per release upgrade scripts in <https://github.com/civicrm/civicrm-core/tree/master/CRM/Upgrade/Incremental/sql>
  
  
  ---
  
  