Templates V10

From TNG_Wiki
Jump to navigation Jump to search

Mobile Mode

Each of the template designs has been made more responsive, to allow them to be more usable on smaller mobile devices.

All templates were changed in TNG V10 to provide
  • mobile mode display
  • standard mode display

While a tablet mode is currently detected, the standard mode display currently is used for tablets. The screen capture on the right is from the mini iPad

Mini-iPad standard mode display.png


If you have modified TNG template code previously to change the layout or add new display options, you will need to make the same changes to those template files in TNG V10 if you want to support displaying your site on mobile devices.

Search for $sitever in the template files - index.php, topmenu.php, and footer.php and make similar changes to your templates.

If you created a new template in an attempt to isolate yourself from TNG Template changes, you will need to update your template with similar changes made to the TNG V10 templates in order to support displaying your site on mobile devices.

See Creating a new Template - TNG V9

New Text Titles

Templates that previously used images for a site title, can now use either the image or a new text field or fields. It is no longer necessary to edit those templates to use the commented out text header options.

You can now select whether to use Text or Image for the title in the Template Settings.

TNG v10 text title option.png


If you previously modified the template to switch images on a language change, that modification can be dropped and the appropriate text entries created for the title in each language.

If you previously modified your template to use the commented out text option for the title, you no longer have to modify the files. You simply have to select the option in Template Settings.

If you want the Title variables at the top of the Template Settings, you will need to manually move the template variables from the bottom of the section for your template to the top so that they are more easily visible after doing the upgrade from a template selection version of TNG. This applies to the following templates:

  • template1
  • template2
  • template3
  • template4
  • template7
This image shows the new text variables in Template 4 that are initially shown just above the Save button TNG v10 new text title options tmpl4.png
This image shows the variables that need to be cut TNG v10 tmpl4 cut new text variables.png
This image shows where to paste the variables TNG v10 tmpl4 paste new text variables.png
This image shows the new look of the Template 4 settings TNG v10 tmpl4 new title after cut paste.png

Footer Text

The Footer text was moved from the templateN/footer.php to genlib.php to better support the Mobile Mode Display


If you previously modified your templateN/footer.php to add your own site copyright information, where you make this change is now different.

You can make the modification to the tng_basicfooter() function in genlib.php, which would apply to all templates and so would be there on a switch.

Preview Slider

A preview slider has been added to the Admin/Templates page to make it easier to see what's available and compare.

Clicking on the image in the slider will select that template.

TNG v10 template preview.png

New Templates

Three new templates (12, 13, 14) have been added.

Feature Pages

The following sample files have been provided for template 4 in the templates/template4 folder:

  • feature1.php
  • family1.php

You can copy the files to your histories folder and edit the html content to create your Feature 1-4 stories. The family1.php file also includes information for creating multi-language feature or family story files.


CSS code was added to support 7 or 8 tabs on the public pages (in case a particular mod needed extra tabs).


If you previously modified the tngtabs1.css files in order to support new tabs, you will need to remove those modifications from your Mod Manager config file.