Template Manager

From TNG_Wiki
Jump to navigation Jump to search
Template Manager
Summary Supports the loading, unloading, saving, and erasing of template data from the TNG database.
Mod Updated 04 Sep 2021
Download link v13.0.4.1
TNG 13.0.4

TNG 13.0.3
TNG 13.0.2

TNG 13.0.1
TNG 13.0

TNG 12.2.0

TNG 12.0

Download stats
Author(s) Bill Herndon
Homepage Template_Manager
Mod Support Template Manager support.
Contact Developer Email me.
Latest Mod for TNG 12.0+ for TNG 12.2 for TNG 13.0 and 13.0.1 for TNG 13.0.2 and 13.0.3 for TNG 13.0.4+
Min TNG V 12.0.0
Max TNG V 13.1.1
Files modified
Related Mods
* v12.2.0.0 has not been tested with the commercial TNG templates offered by Marsha Bryant, but assuming that those templates are not stored differently than bundled TNG templates, the mod should be compatible.


This mod supports the loading, unloading, saving, and erasing of template data from the TNG database. Local template configuration files having the same format as in previous TNG releases are used to store template data when not resident in the TNG database. The mod can be used to preserve templates across releases or for loading entirely new templates.


Bill Herndon


  • A working TNG installation (12.0 - 13.1.1)
  • The Mod Manager


  • Download the .zip file to your mods directory and unpack it.
  • Install the mod using the TNG Mod Manager.
  • Edit the supplied parameters.


  • Disable the mod through the Mod Manager
  • Install the new version of the mod
  • Enable the mod through the Mod Manager


Use Cases

Load New Templates

From TNG 12 on, template parameters and values are stored in the database. For templates already installed prior to a TNG 12 upgrade, this isn't a problem because all the parameters in the existing templateconfig.php file at the time of the upgrade are read and inserted into the tng_template table. Newly installed templates also need a way to have those parameters written to the TNG database. Template Manager's Load function reads a local template configuration file and writes parameters and values to the database. For example, the templates NearDark and NearDawn are now distributed with such a file to support installation using the Template Manager.

Modify or Add Parameters

The Save, Load, and Unload functions support writing a template's parameters to the local file-system and then reloading the parameters back into the TNG database. To add new parameters in an existing template:

  1. Execute Save on the template — This writes template to the file system.
  2. Edit the local _templateconfig.php file, adding new parameters or language specific translations for existing parameters.
  3. Execute Load on the template — When the data from the _templateconfig.php file is written to the database the new or language specific parameters and values are added.

To modify the names of existing parameters, use the same procedure as above but substitite Unload for Save in the first step. This removes the template's data from the database in addition to writing it to the file-system.

Preservation of Parameter Values

The Template Manager supports the preservation of Template Parameter Values Across TNG Releases.

If you are concerned about losing a template's configuration across TNG releases or when installing/de-installing mods, you can always save or unload a template prior to an upgrade or mod installation, restoring its original values after the operation. The Save All and Load All functions can be used to do this for all currently loaded templates.


For templates currently loaded into the TNG database, four operations are supported:

  • Save - Saves the selected template to a template configuration file in the template's root folder or to whatever subfolder has been set in the mod parameters. The configuration file does not need to exist. It will be created or overwritten. But subfolders (when specified) must exist. The template's data remains in the TNG database.
  • Wipe - Removes the selected template's data from the TNG database.
  • Unload - Executes a Save operation followed Wipe on the selected template.
  • Save All - Attempts to save all currently loaded templates to the TNG installation in their respective template folders.

For templates currently in the TNG installation that have valid template configuration files, the following two operations are supported:

  • Load - Loads data from the chosen template's local configuration file into the TNG database. Existing field values are overwritten. New field values are appended.
  • Load All - Attempts to load all templates in the TNG installation that have valid template configuration files into the database.


None. (This mod is not does not support language localization.)



Mod Compatibility

TNG 13.0.2 and 13.0.3

With TNG 13.0.2, a slight simplification to line 27 of file admin_templateconfig.php was made:

	if( is_dir($cms['tngpath'] . "templates/template" . $row['template']) ) {

This change causes named TNG templates (i.e., templates that don't use the template numbering system for their directory name), to be skipped. These templates cannot be edited in the TNG database nor loaded from the templates directory by the Template Manager. Template Manager v13.0.2.0a corrects this behavior for TNG 13.0.2 and 13.0.3. For TNG 13.0.4 Darrin Lythgoe has patched the code so that named templates can be used again. Template Manager v12.2.0.0 should work with this TNG release as will PHP-8 compatible version v13.0.4.1.

Frequently Asked Questions

Coming soon.

Revision History

Version Release Date Comments 04 Sep 2021 PHP-8 compatibility.
03 Sep 2021 PHP-8 compatibility. 05 May 2021 Compatibility with TNG releases 13.0.2 and 13.0.3. 13 Oct 2019 Compatibility with TNG 12.2. This version is required for use with TNG 12.2. 20 May 2018 Initial release

Sites Using Template Manager

If you download and install this mod, please add your TNG site to the table below.

URL User Note Mod Version TNG Version Language(s)
Lindell-Herndon Genealogy Bill Herndon Mod developer, public site 13.1 DA, DE, EN, ES, FR, SV
Roots & Relatives Remembered Ron Krzmarzick Public & Private See Here See Here EN,DE,CS
Our Roy and Boucher Family Ken Roy Great mod to preserve template values and help modify existing templates 13.0.4 EN, FR
Hooley Family Links Rick Hooley Public/Private See Here See Here EN
Dabbling in Genealogy Jeff Rueger Public/Private site (?) 13.0.4 EN
Woking Family Tree Project TBirdUK Public/Private site - This mod saved my Sanity (?) 13.0 EN
Rintoul/Bowman Family Andrew Rintoul Public/Private site (?) 13.0.4 DE, EN, ES, FR
Brabantse Genealogie Rob van Rij Public site 12.2 EN, NL
Auf den Spuren meiner Vorfahren UHaase Public/Private 12.0.1 DE, EN
Genealogische Datenbank JPB Public see here see here DE, EN, FR
LookingBackwards - All Our Relations Ashleigh Mitchell Public v12.2.0.0 13.0.4 EN
Genealogy of a Dutch East-Indies Family Rob Severijns Private; Great Mod ! 13.1.1 NL, EN
Baza danych Rodziny Jarocińskich Michał Jarociński Non-public site. What a useful Mod! V12.2.0.0 13.0 PL,EN