Templates - Explained - Prior to TNG 8.1
|The following information pertains to TNG versions prior to TNG v8.1||
The TNG install folder contains the default TNG template, shown as the Plain template on the demo site.
TNG provides several templates that can be used to customize the look and feel of your TNG site. In order to choose a template, take a look at Darrin's demo site and try the pages with the various templates and then decide which one you want to use.
- TNG 10 supports 1 through 14
- TNG 9 supported 1 through 11
- TNG 8 supported 1 through 8
- TNG 7 supported 1 through 8
- TNG 6 supported 1 through 6
|TNG version:||≥ 7.0|
After deciding which template you want to use, you copy all the files from the templates\templateN folder (where N is 1 through 8) to your TNG root folder. You will need to overlay some files like footer.php, templatestyle.css, topmenu.php, index.php, and others, so you may want to rename or backup the files that are to be overlaid before replacing them. All the files in the specific template folder should be copied over the default TNG template files which are comprised of the following elements.
The genstyle.css defines the standard TNG styles used. If necessary, the templatestyle.css in each specific template provides the specific overrides to the style for the look and feel of that template.
The meta.php is included in each page by the tng_header function based on the file being specified in Setup >> Configuration >> General Settings >> Site Design and Specification Custom Meta. It provides the standard TNG meta parameters used. You can add your own <meta> statements to this file. The meta.php provides the $cms[tngpath] for the CSS style sheets so that it works correctly for histories added using the historiestemplate.php
|TNG version:||≤ 6.2|
|TNG version:|| 8.1
The templatestyle.css, which is new with TNG 7.0.0, contains the overrides to the TNG styles defined in the genstyle.css for the specific template and replaces the version of the genstyle.css previously included in the template folder.
The templatestyle.css is also be used to override the tngtabs1.css or tngtabs2.css file for the template.
The mytngstyle.css file is designed to provide your overrides to the TNG genstyle.css and the template style sheets -- templatestyle.css, tngtabs1.css or tngtabs2.css files.
If you want to make changes to the TNG styles, the templatestyle.css defined styles, or add your own styles, you should make the overrides or additions in your mytngstyle.css so that your style changes will not be lost in a future release or upgrade of TNG.
Templates - Overriding provides an example of how to override the styles.
Templates - Add new style provides an example of how to add a style.
The topmenu.php file is included in each page by the tng_header function based on the file being specified in Setup >> Configuration >> General Settings >> Site Design and Specification Custom Header. It provides the banner or top section of each TNG page and for some templates provides the left navigation area menu. The topmenu.php contains the <body> statement but not the end of body </body> statement. So care must be taken when editing this file that your editor does not try to correct the syntax, as normally would happen with editors like FrontPage.
The template topmenu.php files were updated in TNG 7.0.0 to remove hard-coded style and formatting information and instead use style class= statements
You may need to use a utility like WinMerge in Windows to compare the new topmenu.php file with your previous version of the template file in order to update your previously modified version of the topmenu.php file
|TNG version:|| 6.2
The footer.php file is included in each page by the tng_header function based on the file being specified in Setup >> Configuration >> General Settings >> Site Design and Specification Custom Footer. It provides the footer of each TNG page.
The template footer.php files were updated in TNG 7.0.0 to remove hard-coded style and formatting information and instead use assigned style class= statements
You may need to use a utility like WinMerge in Windows to compare the new footer.php file with your previous version of the template file in order to update your modified version of the footer.php file.
|TNG version:||≤ 6.2|
Each template provides an index.php that can be customized as the home page for your site. You need to use the index.php from the template folder that matches the look and feel you have chosen for your site.