Template Settings - Template2
Settings
The following illustrates how you can use the new TNG V8 Template Settings to change the photos for Template 2. Also included are instructions that were extracted from the index.php and topmenu.php for Template 2 on how to use text instead of images for the page heading.
TNG V8 Template Settings allows you:
for Template 2 |
![]() |
Images
If you create your own images, you should use the same dimensions as used by Template 2 as shown below for the default images provided.
|
|
Home Page Title
The Home Page title is generated by the $text['ourpages'] variable passed on the tng_header function call.
tng_header( $text['ourpages'], $flags );
To change it copy it variable from the languages/English/text.php or languages/English-UTF8/text.php file
$text['ourpages'] = "Our Family Genealogy Pages";
paste it in your languages/English/cust_text.php (or languages/English-UTF8/cust_text.php) file and modify it to reflect your Home Page title, for example
$text['ourpages'] = "Martin Family Genealogy Pages";
Optional Text Title
index.php
Optionally, you can comment out line 47 of template 2 index.php (Note that the code was wrapped for display purposes below)
<!-- <img src="<?php echo $cms['tngpath']; ?><?php echo $tmp['t2_titleimage']; ?>" alt="" width="443" height="114" class="noimgborder" /> -->
and remove the start comments ( <!-- ) on line 55 and end comments ( --> ) on line 63, and change the Our Family<br />Genealogy Pages on line 59 to your own personal text rather than creating a text image.
This option also allows you to use the $text['ourpages'] variable by changing line 50 to use <?php echo "$text['ourpages'] \n"; ?> which will echo the $text variable from your language text.php files so your home page title changes with a dynamic language switch.
The English/text.php has
$text['ourpages'] = "Our Family Genealogy Pages";
and the French/text.php
$text['ourpages'] = "La généalogie de notre famille";
which you can also override to use a different text value in your language cust_text.php
Optionally, you can comment out line 31 of template 2 topmenu.php (Note that the code was wrapped for display purposes below)
<!-- <img src="<?php echo $cms['tngpath']; ?><?php echo $tmp['t2_headtitleimg']; ?>" alt="<?php echo $text['ourpages']; ?>" width="312" height="78" class="noimgborder" /> -->
and remove the start comments ( <!-- ) on line 39 and end comments ( --> ) on line 45, and change the Our Family<br />Genealogy Pages on line 42 to your own personal text rather than creating a text image.
This option also allows you to use the $text['ourpages'] variable by changing line 50 to use <?php echo "$text['ourpages'] \n"; ?> which will echo the $text variable from your language text.php files so your home page title changes with a dynamic language switch.
Return to Template Settings