Template Settings - Template3

From TNG_Wiki
Jump to navigation Jump to search

Settings

The following illustrates how you can use the new TNG V8 Template Settings to change the photos for Template 3. Also included are instructions that were extracted from the index.php and topmenu.php for Template 3 on how to use text instead of images for the page heading.

TNG V8 Template Settings allows you to change what images will be used for:
  • your Home page
  • your other TNG pages

for Template 3

Template 3 settings

Images

If you create your own images, you should use the same dimensions as used by Template 3 as shown below for the default images provided.

Template 3 home page header

  • file name is title.gif
  • dimensions are 630 X 93 pixels
  • used in line 20 of index.php

Template 3 home page photo

  • file name is mainphoto.jpg
  • dimensions are 530 x 303 pixels
  • used in line 40 of index.php

Home Page Title

The Home Page title is generated by the $text['mnuheader'] variable passed on the tng_header function call.

tng_header( $text['mnuheader'], $flags );

To change it copy it variable from the languages/English/text.php or languages/English-UTF8/text.php file

$text['mnuheader'] = "Home Page";

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['mnuheader'] = "Martin Family";

Optional Text Title

index.php

Optionally, you can comment out line 29 of template 3 index.php (note that code was wrapped for display below)

	<!-- <			<img src="<?php echo $cms['tngpath']; ?><?php echo 
$tmp['t3_titleimage']; ?>" alt="" class="titleimg" width="630" height="93" />
 --> 

and remove the start comments ( <!-- ) on line 37 and end comments ( --> ) on line 45, and change the Our Family History on line 41 to your own personal text rather than creating a text image.


This option also allows you to use a $text variable by changing line 41 to use <?php echo "$text[myheader] \n"; ?> which will echo the $text variable from your language cust_text.php files so your home page title changes with a dynamic language switch.

If you choose to use the optional text titles, you may also want to update the tng_header line to use the same $text variable in index.php

topmenu.php

Optionally, you can comment out line 15 of template 3 topmenu.php (note that code was wrapped for display below)

	<!-- <img src="<?php echo $cms['tngpath']; ?><?php echo $tmp['t3_headimg']; ?>" alt="" 
class="headerphoto" width="186" height="110" /> --> 

and remove the start comments ( <!-- ) on line 34 and end comments ( --> ) on line 40, and change the Our Family History on line 37 to your own personal text rather than creating a text image.

This option also allows you to use a $text variable by changing line 37 to use <?php echo "$text['myheader'] \n"; ?> which will echo the $text variable from your language cust_text.php files so your home page title changes with a dynamic language switch.


Return to Template Settings