Contact Us Subject Line

From TNG_Wiki
Jump to navigation Jump to search
Ambox notice.png TNG v9 added a Subject line to the Contact Us email. This article shows how you can pass a subject line on user created pages.
TNG 9.0


TNG v9 added the capability to pass a Subject line to the Contact Us email. This is done automatically for TNG generated pages from the title passed for the page to the tng_header function.

This capability is therefore available to your user-created pages that use the tng_header function as is done in the historytemplate.php.

If you suppress the menu bar icons from being generated and later invoke the tng_icons function directly, you now need to add a second parameter to the tng_icons function call as shown below in the different methods used to generate a Subject line for the Contact Us form.

Contact Us form in TNG V9

Using tng_header function

$flags['noicons'] = false;
tng_header( "Acadian, Canadian, and Maine Research Resources", $flags );

Using tng_icons function

$title = "Acadian, Canadian, and Maine Research Resources"); 
echo tng_icons(1, $title);

Note that with TNG V9 the the tng_icons now has a second parameter, that is used to generate the subject line for the Info, Contact Us pull down menu option, when you use this function to control where the menu bar will be placed on a user-created page.

Links to suggest.php

If you add links to the TNG suggest.php script, you can pass a subject line by adding ?page= to the URL link.

You can define a $page variable to be used to pass the subject line

$page = "Acadian, Canadian, and Maine Research Resources");

when used with the link to the suggest.php script.

   echo "<a href=\"{$cms['tngpath']}suggest.php?page=$page\" >{$text['contactus']}</a>\n";