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?

  • 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 - Jun 13, 2016 at 8:35
  • 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 Jun 13, 2016 at 8:37
  • @Ramesh - thank you for the suggestion. I am a new member of civicrm and would surely discuss this with my mentor. Jun 13, 2016 at 20:52

1 Answer 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


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.