Template Settings - Template4
The following illustrates how you can use the new TNG V8 Template Settings to change the photos, headings, links, and text for Template 4. Also included are instructions that were extracted from the index.php and topmenu.php for Template 4 on how to use text instead of images for the page heading.
Settings
TNG V8.1.2 Validation
TNG version: | ≥ 8.1.2 |
The Home page (index.php) in TNG V8.1.2 should pass XHTML validation.
However, if you enter HTML codes in the Welcome paragraph in order to show additional paragraph separations of text and to add a new heading, then you will need to omit the first paragraph starting and the last paragraph ending tags, because the text you enter for the Welcome paragraph is enclosed within a set of paragraph <p> </p> tags.
TNG V8.1 Impact
TNG version: | 8.1 |
Note that if you were using the Template Settings option in TNG V8 and in TNG V8.1 are using the Enable Template Selection capability, you can no longer put images in your own folders or use an image that is in a different folder such as photos/thumbs/ shown in the above image. TNG V8.1 expects all images used in the template files to be in the templates/templateN/img folder. Therefore you will need to
- Update the Template Settings to change the entries that specified user or other TNG folders to indicate only img/imagename.jpg
- Copy the images to the specific templates/templateN/img folder
If you were modifying the template files directly, this will not impact you.
Images
If you create your own images, you should use the same dimensions as used by Template 4 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 English/text.php file
$text['ourpages'] = "Our Family Genealogy Pages";
paste it in your English/text.php file and modify it to reflect your Home Page title, for example
$text['ourpages'] = "Martin Family Genealogy Pages";
Optional Text Title
Optionally, you can comment out line 95 of template 4 index.php and line 78 of topmenu.php (note that code was wrapped for display purposes below)
<!-- < <img src="<?php echo $cms['tngpath']; ?><?php echo $tmp['t4_titleimg']; ?>" alt="" class="banner" width="468" height="100" /> -->
and remove the start comments ( <!-- ) on line 103 in index.php and line 87 in topmenu.php and the end comments ( --> ) on line 110 in index.php and line 93 in topmenu.php, and change the Our Family on line 106 in index.php and line 89 in topmenu.php and Genealogy Pages on line 107 in index.php and line 90 in topmenu.php to your own personal text rather than creating a text image.
Action | Character | index.php | topmenu.php |
---|---|---|---|
comment out | // | line 95 | line 78 |
remove the start comments | <!-- | line 103 | row 2, cell 3 |
remove the end comments | --> | line 110 | line 93 |
change text for | Our Family | line 106 | line 89 |
change text for | Genealogy Pages | line 107 | line 90 |
This option also allows you to use a $text variable by changing line 103 to use <?php echo "$text['myheader1'] \n"; ?> and line 104 to use <?php echo "$text['myheader2'] \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.
Home Page Links
Colors for the links on the index.php page of template 4 (feature stories and contact us) do not seem to be set in the templatestyle.css file - they are not named so have no sectors to target them with. The only way I found to change them was in the genstyle.css. Search for "A:LINK" and "A:VISITED" and set your color there. Note this will affect any other un-styled links as well. You should probably copy the lines from the genstyle.css into your mytngstyle.css file and change the color there.
- Note that an alternative to overriding the A:LINK and A:VISITED styles you could change the class="emphasis" on the feature links to use class="featurelink" and then define the appropriate attributes for the featureline class in your mytngstyle.css file. --Ken Roy 12:15, 31 January 2011 (UTC)
Return to Template Settings