{"id":11609,"date":"2022-07-24T16:03:13","date_gmt":"2022-07-24T16:03:13","guid":{"rendered":"https:\/\/fhug.org.uk\/kb\/?post_type=kb_article&#038;p=11609"},"modified":"2026-11-28T16:08:54","modified_gmt":"2026-11-28T16:08:54","slug":"adding-and-customising-source-templates-in-version-7","status":"publish","type":"kb_article","link":"https:\/\/www.fhug.org.uk\/kb\/kb-article\/adding-and-customising-source-templates-in-version-7\/","title":{"rendered":"Adding, Customising and Sharing Source Templates in Versions 7 and 8"},"content":{"rendered":"<h2>Introduction<\/h2>\n<p>Many users will never need\/choose to customise Source Templates but everyone who uses them will need to add some to their project. This article introduces some key terminology, describes how to add Templates to a project, and (for those users who wish to do so) how to create new Templates or customise existing ones.<\/p>\n<p>If you have not already done so, we recommend you read <a href=\"\/kb\/kb-article\/working-with-sources-and-citations-in-version-7\/\">Sources and Citations in FH7 (for Upgraders)<\/a> or <a href=\"\/kb\/kb-article\/sources-and-citations-in-version-7-for-new-users\/\">Sources and Citations in FH7 (for New Users)<\/a>\u00a0before continuing here.<\/p>\n<div class=\"lightweight-accordion\"><details><summary class=\"lightweight-accordion-title\"><h3>Terminology:  Source Template Definitions, Source Template Records and Collections<\/h3><\/summary><div class=\"lightweight-accordion-body\"><p><glwrap>A Source Template Definition includes information needed to identify the Template (the Template name, a Category and possibly a Subcategory which are useful when determining which Template to use), and a description of the Template. It also includes all the information needed to determine how a particular Template behaves: what fields are included and the type of data each holds, and how the Title, Footnote, Short Footnote and Bibliography entry are constructed from those fields.<\/p>\n<p>Source\u00a0Template Definitions do <strong>not <\/strong>form part of any project, but sit outside them, available to be added to one or more projects of your choice. When you add a Source\u00a0Template Definition to a project, it creates a Source\u00a0Template Record, which does sit inside a project and appears in the Source\u00a0Template record list.\u00a0 The distinction becomes important when Customising Templates, as changes you make to a Source\u00a0Template Record are not automatically applied to a Source\u00a0Template Definition (more on this later, for advanced users).<\/p>\n<p>A Collection is a group of Source\u00a0Template Definitions. The standard collections supplied with <span class=\"fh\" style=\"font-size: 17px !important; line-height: 21.4286px !important;\">\u0192<span style=\"color:#73B262; font-weight: bold;\">h<\/span><\/span> are the Essentials Collection and the Advanced Collection, but you can create additional custom Collections for your own use or to share with others.<\/p>\n<p><\/glwrap><\/p>\n<\/div><\/details><\/div>\n<div class=\"lightweight-accordion\"><details><summary class=\"lightweight-accordion-title\"><h3>How to Make Templates Available in a Project<\/h3><\/summary><div class=\"lightweight-accordion-body\"><p><img decoding=\"async\" class=\"wp-image-11661 alignleft lazyload\" data-src=\"\/kb\/wp-content\/uploads\/2020\/09\/Screenshot-2020-10-16-124243.png\" alt=\"\" width=\"400\" height=\"174\" data-wp-editing=\"1\" data-srcset=\"https:\/\/www.fhug.org.uk\/kb\/wp-content\/uploads\/2020\/09\/Screenshot-2020-10-16-124243.png 557w, https:\/\/www.fhug.org.uk\/kb\/wp-content\/uploads\/2020\/09\/Screenshot-2020-10-16-124243-300x130.png 300w, https:\/\/www.fhug.org.uk\/kb\/wp-content\/uploads\/2020\/09\/Screenshot-2020-10-16-124243-150x65.png 150w\" data-sizes=\"(max-width: 400px) 100vw, 400px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 400px; --smush-placeholder-aspect-ratio: 400\/174;\" \/>When you create a new Project or import a Project from <span class=\"fh\" style=\"font-size: 17px !important; line-height: 21.4286px !important;\">\u0192<span style=\"color:#73B262; font-weight: bold;\">h<\/span><\/span>6, no Source Template Records are included. The first time you attempt to Create a Source from a Template, you will be asked if you wish to add the Templates from the Essentials collection, or whether you wish to add Templates as needed.<\/p>\n<p>If you accept the offer, the Essentials collection of Source Template Definitions will be used to create Source Template Records within your project.<\/p>\n<p>If you choose not to accept the offer, you can add Templates at any point using <a href=\"#!\" class=\"cs_tooltip\" fhugtt=\"This is the menu across the top of the main Family Historian windows. The &gt; denotes a submenu\">Tools&nbsp&gt;&nbspSource&nbspTemplate&nbspDefinitions&#8230;<\/a>, or by clicking the <em>Find More&#8230;<\/em> button wherever you&#8217;re prompted to select a Source Template Record (for example when Creating a Source from a Template). Both routes will open the <em>Source Template Definitions Dialog<\/em>, which allows you to select the Templates you want to add, and is described at <a href=\"https:\/\/www.family-historian.co.uk\/help\/fh7\/hh_start.htm#sourcetemplatedefinitiondialog.html\" target=\"_blank\" rel=\"noopener noreferrer\">Source Template Definitions Dialog<\/a><\/p>\n<\/div><\/details><\/div>\n<div class=\"lightweight-accordion\"><details><summary class=\"lightweight-accordion-title\"><h3>Creating and Customising Templates<\/h3><\/summary><div class=\"lightweight-accordion-body\"><p>The Source Template Definitions Dialog is the starting point for creating\/editing your own Source Template Definitions; open it via <a href=\"#!\" class=\"cs_tooltip\" fhugtt=\"This is the menu across the top of the main Family Historian windows. The &gt; denotes a submenu\">Tools&nbsp&gt;&nbspSource&nbspTemplate&nbspDefinitions&#8230;<\/a>, or by clicking the <em>Find More&#8230;<\/em> button wherever you&#8217;re prompted to select a Source Template Record (for example when Creating a Source from a Template). It is also possible to edit a project&#8217;s Source Template Records directly. That suits changes meant for one project only, and Templates that have no Definition, but it is the wrong tool for renaming or retyping fields that already hold data (see below). A Record edited this way no longer matches its Definition, which then shows &#8216;mod&#8217; in the Used column. For anything you want to reuse in other projects, edit the Definition, which also has the facilities for keeping everything in sync.<\/p>\n<p>You cannot edit the standard Source Template Definitions (or add to the standard Collections), but you can <em>Clone&#8230;<\/em> an existing Template Definition or create a <em>New&#8230;<\/em> Template Definition. Both Cloned and New Definitions can be put in a Collection of your own. By default, this Collection is called Custom; however, you can call your Collection anything you like, and have as many of your own Collections as you wish. You might want to create a Collection of Templates suitable for Sources\u00a0generated in a particular country, or one for the various sorts of Military Service Records created in the UK. Or you might be content with the Essentials Collection of Templates, except for some changes to the Record Title Formats to ensure all the source-identifying data is included in the Title when you <a href=\"\/kb\/kb-article\/exporting-templated-sources\/\">export a Gedcom file<\/a>.<\/p>\n<p>The <a href=\"https:\/\/www.family-historian.co.uk\/help\/fh7\/hh_start.htm#sourcetemplatedefinitiondialog.html\" target=\"_blank\" rel=\"noopener noreferrer\">Help file<\/a> covers creating and customising Templates, but there are some key things to bear in mind:<\/p>\n<ul>\n<li>Changes you make to a Source Template Definition will <strong>not<\/strong> be applied to the corresponding Source Template Record and associated Source records in your Project until you use the <em>Compare\/Sync with Source Template Record&#8230;<\/em> button within the Source Template Definitions dialog and use its <em>Perform Task<\/em> options.<\/li>\n<li>\n<p>Editing a Source Template Record directly does <strong>not<\/strong> update the Sources and Citations already created from it, and <span class=\"fh\" style=\"font-size: 17px !important; line-height: 21.4286px !important;\">\u0192<span style=\"color:#73B262; font-weight: bold;\">h<\/span><\/span> gives no warning. That is fine for many changes: formats, prompts and Enum lists, adding a field, or anything at all in a Template that no Source uses yet. It is also the only way to change a Template that has no Definition, such as one imported from another program.<\/p>\n<p>What it must <strong>not<\/strong> be used for is renaming a field, or changing its Type or Citation setting, once the field holds data. The values already entered are then disconnected. They stay in the project and show as &#8216;Undefined&#8217; on the All tab, but disappear from the Main tab and from footnotes and bibliographies, where a renamed or deleted field prints &#8216;ERROR: *** ***&#8217;. A later Compare\/Sync does not reconnect them; restoring the field&#8217;s original name and Type does.<\/p>\n<\/li>\n<li>If you want to delete a custom Template completely, you must not only delete the relevant Source Template Definition using <a href=\"#!\" class=\"cs_tooltip\" fhugtt=\"This is the menu across the top of the main Family Historian windows. The &gt; denotes a submenu\">Tools&nbsp&gt;&nbspSource&nbspTemplate&nbspDefinitions&#8230;<\/a> and then selecting the relevant Template and clicking Delete; you must also delete the corresponding Source Template Record in any projects where it is present, by using <a href=\"#!\" class=\"cs_tooltip\" fhugtt=\"This is the menu across the top of the main Family Historian windows. The &gt; denotes a submenu\">View&nbsp&gt;&nbspOther&nbspRecord&nbspLists&nbsp&gt;&nbspSource&nbspTemplates<\/a> (if the Source Templates are not already visible in the Records Window), and selecting the relevant Source Template Record and using the DEL key to delete it.<\/li>\n<\/ul>\n<p><span class=\"fh\" style=\"font-size: 17px !important; line-height: 21.4286px !important;\">\u0192<span style=\"color:#73B262; font-weight: bold;\">h<\/span><\/span> ties each value in a Source or Citation to its field by the field&#8217;s code and Type. The code is derived from the field name (spaces become underscores) and cannot be edited separately, so renaming a field changes its code.<\/p>\n<p>Special care is needed when deleting or changing an existing Field definition:<\/p>\n<ul>\n<li>\n<p>Deleting a Field definition does not delete its values; they are left behind as &#8216;Undefined&#8217; fields, which is why step 1 clears them first. For a Citation-specific field the values are in the Citations, not the Source records. Remove the field&#8217;s code from the formats as well, or footnotes will print &#8216;ERROR: *** ***&#8217; <glwrap>in its place<\/glwrap>. Compare\/Sync cannot remove a field from the Source Template Record, which is why step 2 uses the Property Box.<\/p>\n<p>Before deleting a Field definition from the Source Template Definition perform the following steps:<\/p>\n<ul>\n<li>Create a Query or Records Window column to display the Source record Field and delete all instances of its value.<\/li>\n<li>In the Source Template record Property Box, delete the Field Definition via the All tab.<\/li>\n<li>Finally, in the Source Template Definition, delete the Field, then Save and Close and ensure <em>Compare\/Sync with Source Template Record&#8230;<\/em> is OK.<\/li>\n<\/ul>\n<p>In Version 8, the <a href=\"https:\/\/www.fhug.org.uk\/kb\/download\/undefined-template-fields\/\">Undefined Template Fields<\/a> smart folders make a good final check. They list every value that a template no longer defines, in Source records and in Citations, so you can select the leftovers and delete them in one go. They also find values left behind when a field was deleted without these steps.<\/p>\n<\/li>\n<li>\n<p>Rename or retype a field in the Definition and then sync it. Do not change the Record first: Compare\/Sync only moves values that are still attached to the field.<\/p>\n<p>To rename a field, change its name in the Source Template Definition Editor and correct the four formats yourself; the Editor reports &#8216;Code not found&#8217; on Save if you forget. In the Compare dialog the old and new fields appear on separate lines. Select the new one, click <em>View\/Sync Item<\/em>, choose the old field in the <em>Field from Source Template Record<\/em> droplist, then use <em>Perform Task &gt; Update record field<\/em>. Existing values move to the new name. Sync each format separately, or footnotes will print &#8216;ERROR: *** ***&#8217; where the old code was.<\/p>\n<p>Changing a field&#8217;s Type the same way converts existing values, with two exceptions: Date to Text and Repository to Text leave the field empty. Text to Date keeps anything that is not a date as a date phrase. Take a backup first, as the Caution message says.<\/p>\n<p>The Citation setting of a field cannot be changed while the field is in use. Automatic titles of existing Sources are not refreshed by a sync; each is rebuilt when the Source is next edited.<\/p>\n<\/li>\n<li>In <span class=\"fh\" style=\"font-size: 17px !important; line-height: 21.4286px !important;\">\u0192<span style=\"color:#73B262; font-weight: bold;\">h<\/span><\/span>8 the Compare dialog also has an <em>Adjust Field Order<\/em> button, enabled when the Source Template Definition and the Source Template Record list the same fields in a different order. It reorders one to match the other, in either direction, without touching the fields themselves.<\/li>\n<\/ul>\n<p><img decoding=\"async\" class=\"wp-image-11661 aligncenter lazyload\" data-src=\"\/kb\/wp-content\/uploads\/2025\/03\/Compare-Fields-Dialogue-and-Caution.png\" alt=\"\" width=\"950\" height=\"320\" data-wp-editing=\"1\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 950px; --smush-placeholder-aspect-ratio: 950\/320;\" \/><\/p>\n<\/div><\/details><\/div>\n<div class=\"lightweight-accordion\"><details><summary class=\"lightweight-accordion-title\"><h3>Sharing User-Defined and Imported Templates<\/h3><\/summary><div class=\"lightweight-accordion-body\"><p><span class=\"fh\" style=\"font-size: 17px !important; line-height: 21.4286px !important;\">\u0192<span style=\"color:#73B262; font-weight: bold;\">h<\/span><\/span> is written assuming a workflow from the Source Template Definition to Source Template Record to Source Record, so if a new template is required this is normally implemented by creating the definition first.\u00a0 While this is usually the preferred route, there will be occasions where the template is created without a definition.\u00a0 In particular, when Source Template Records are imported from another application, <span class=\"fh\" style=\"font-size: 17px !important; line-height: 21.4286px !important;\">\u0192<span style=\"color:#73B262; font-weight: bold;\">h<\/span><\/span> does not automatically create the corresponding definition.\u00a0 If there is no definition file, the Source Template Record cannot be shared with other projects.\u00a0 Another common scenario is where a user who is familiar with Source Templates from another application but unfamiliar with <span class=\"fh\" style=\"font-size: 17px !important; line-height: 21.4286px !important;\">\u0192<span style=\"color:#73B262; font-weight: bold;\">h<\/span><\/span> Source Template Definitions will create new Source Template Records directly.<\/p>\n<p>It is not possible to create Source Template Definitions from existing Source Template Records in <span class=\"fh\" style=\"font-size: 17px !important; line-height: 21.4286px !important;\">\u0192<span style=\"color:#73B262; font-weight: bold;\">h<\/span><\/span> &#8220;out of the box&#8221;, but this gap is filled by the <a href=\"https:\/\/pluginstore.family-historian.co.uk\/page\/plugin\/create-source-template-definitions\">Create Source Template Definitions<\/a>\u00a0plugin.\u00a0 Download and run this plugin to automatically create all missing Source Template Definitions and add them to the corresponding Collection file.<\/p>\n<p>Once the missing Source Template Definitions have been created, any user-defined or imported templates can be added to other <span class=\"fh\" style=\"font-size: 17px !important; line-height: 21.4286px !important;\">\u0192<span style=\"color:#73B262; font-weight: bold;\">h<\/span><\/span> projects as described above.<\/p>\n<\/div><\/details><\/div>\n<div class=\"lightweight-accordion\"><details><summary class=\"lightweight-accordion-title\"><h3>Importing and Exporting Collections<\/h3><\/summary><div class=\"lightweight-accordion-body\"><p><a href=\"#!\" class=\"cs_tooltip\" fhugtt=\"This is the menu across the top of the main Family Historian windows. The &gt; denotes a submenu\">File&nbsp&gt;&nbspImport\/Export<\/a> or the Source Template Definitions Dialog <em>Import&#8230;<\/em> and <em>Export&#8230;<\/em> buttons allow you to use Template Collection files (.fhst extension) created by other people, or to make a Collection that you&#8217;ve created available for other people to use.<\/p>\n<p>Collections which FHUG users have made available for others can be found at <a href=\"\/kb\/download-type\/source-templates\/\">Download Type: Source Templates<\/a>. If you want to contribute a Collection of your own, please go to <a href=\"\/kb\/add-download\/\">Add\/Update a Download<\/a>.<\/p>\n<\/div><\/details><\/div>\n","protected":false},"template":"","fh_version":[739,826],"skill_level":[18,17,16],"topic":[83],"class_list":["post-11609","kb_article","type-kb_article","status-publish","hentry","fh_version-v7","fh_version-v8","skill_level-advanced","skill_level-intermediate","skill_level-newcomer","topic-sources-and-citations"],"_links":{"self":[{"href":"https:\/\/www.fhug.org.uk\/kb\/wp-json\/wp\/v2\/kb_article\/11609","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.fhug.org.uk\/kb\/wp-json\/wp\/v2\/kb_article"}],"about":[{"href":"https:\/\/www.fhug.org.uk\/kb\/wp-json\/wp\/v2\/types\/kb_article"}],"version-history":[{"count":5,"href":"https:\/\/www.fhug.org.uk\/kb\/wp-json\/wp\/v2\/kb_article\/11609\/revisions"}],"predecessor-version":[{"id":13433,"href":"https:\/\/www.fhug.org.uk\/kb\/wp-json\/wp\/v2\/kb_article\/11609\/revisions\/13433"}],"wp:attachment":[{"href":"https:\/\/www.fhug.org.uk\/kb\/wp-json\/wp\/v2\/media?parent=11609"}],"wp:term":[{"taxonomy":"fh_version","embeddable":true,"href":"https:\/\/www.fhug.org.uk\/kb\/wp-json\/wp\/v2\/fh_version?post=11609"},{"taxonomy":"skill_level","embeddable":true,"href":"https:\/\/www.fhug.org.uk\/kb\/wp-json\/wp\/v2\/skill_level?post=11609"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.fhug.org.uk\/kb\/wp-json\/wp\/v2\/topic?post=11609"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}