Adding, Customising and Sharing Source Templates in Version 7

Introduction

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.

If you have not already done so, we recommend you read Sources and Citations in FH7 (for Upgraders) or Sources and Citations in FH7 (for New Users) before continuing here.

Terminology: Source Template Definitions, Source Template Records and Collections

A Source Template Definition includes information needed to identify the Template (the Template name, a Category and possible 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 is constructed from those fields.

Source Template Definitions do not 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 Template Definition to a project, it creates a Source Template Record, which does sit inside a project and appears in the Source Template record list.  The distinction becomes important when Customising Templates, as changes you make to a Source Template Record are not automatically applied to a Source Template Definition (more on this later, for advanced users).

A Collection is a group of Source Template Definitions. The standard collections supplied with ƒh are the Essentials Collection and the Advanced Collection, but you can create additional custom Collections for your own use or to share with others.

How to Make Templates Available in a Project

When you create a new Project or import a Project from ƒh6, 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.

If you accept the offer, the Essentials collection of Source Template Definitions will be used to create Source Template Records within your project.

If you choose not to accept the offer, you can add Templates at any point using Tools > Source Template Definitions…, or by clicking the Find More…button wherever you’re prompted to select a Source Template Record (for example when Creating a Source from a Template). Both routes will open the Source Template Definitions Dialog, which allows you to select the Templates you want to add, and is described at Source Template Definitions Dialog

Creating and Customising Templates

The Source Template Definitions Dialog is the starting point for creating/editing your own Source Templates Definitions; open it via Tools > Source Template Definitions…, or by clicking the Find More…button wherever you’re prompted to select a Source Template Record (for example when Creating a Source from a Template). It is possible to edit a project’s Source Template Records directly but we don’t recommend it as the editing and template management facilities are better in the Source Templates Definition Dialog, including facilities for keeping everything in synch.

You cannot edit the standard Source Template Definitions (or add to the standard Collections), but you can Clone… an existing Template Definition or create a New… 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 generated 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 export a Gedcom file.

The Help file covers creating and customising Templates, but there are some key things to bear in mind:

  • Changes you make to a Source Template Definition will not be applied to the corresponding Source Template Record in your Project until you use the Compare/Synch with Source Template Record... button within the Source Template Definitions dialog.
  • Changes you make to a Source Template Record within your Project (by editing it directly, or synchronizing it with changes you have made to the corresponding Source Template Definition) will not affect a Source already created from that Template unless and until you make one or more changes to the Source.
  • If you want to delete a custom Template completely, you must not only delete the relevant Source Template Definition using Tools > Source Template Definitions… 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 View > Other Record Lists > Source Templates (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.

Sharing User-Defined and Imported Templates

ƒh 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.  While this is usually the preferred route, there will be occasions where the template is created without a definition.  In particular, when Source Template Records are imported from another application, ƒh does not automatically create the corresponding definition.  If there is no definition file, the Source Template Record cannot be shared with other projects.  Another common scenario is where a user who is familiar with Source Templates from another application but unfamiliar with ƒh Source Template Definitions will create new Source Template Records directly.

It is not possible to create Source Template Definitions from existing Source Template Records in ƒh “out of the box”, but this gap is filled by the Create Source Template Definitions plugin.  Download and run this plugin to automatically create all missing Source Template Definitions and add them to the corresponding Collection file.

Once the missing Source Template Definitions have been created, any user-defined or imported templates can be added to other ƒh projects as described above.

Importing and Exporting Collections

File > Import/Export or the Source Template Definitions Dialog Import… and buttons allow you to use Template Collection files (.fhst extension) created by other people, or to make a Collection that you’ve created available for other people to use.

Collections which FHUG users have made available for other are found at Download Type: Source Templates. If you want to contribute a Collection of your own, please go to Add/Update a Download.

 

Last update: 24 Jul 2022