Use
eval('$customtemp = "' . fetch_template('customtemp') . '";');
Place this in the same subpage where the template where you would like the html of "customtemp" to be.
In this case you want to place the new template function in this section.
PHP Code:
if ($_REQUEST['do'] == "main")
{
$navbits[$parent] = 'Main Page';
$navbits = construct_navbits($navbits);
eval('$navbar = "' . fetch_template('navbar') . '";');
// change the line below to contain the name of the actual main output template used in your script
eval('print_output("' . fetch_template('test_mytesttemplate1') . '");');
}
It doesn't matter where you put it but I would suggest above the existing fetch_template function.
PHP Code:
if ($_REQUEST['do'] == "main")
{
$navbits[$parent] = 'Main Page';
$navbits = construct_navbits($navbits);
eval('$navbar = "' . fetch_template('navbar') . '";');
eval('$customtemp = "' . fetch_template('customtemp') . '";');
// change the line below to contain the name of the actual main output template used in your script
eval('print_output("' . fetch_template('test_mytesttemplate1') . '");');
}
I'll explain how a fetch_template function with a variable works.
[COLOR=Red]
eval('$customtemp = "' . fetch_template('customtemp') . '";');
The "$customtemp" variable is what you put in another template file.
So in the "test_mytesttemplate1" template you should have the variable "$customtemp".
The text in side the "fetch_template" function (which is "customtemp") is the template it's getting the html from.