Quote:
Originally Posted by nautiqeman
Thanks Colin,
But when you look in the ACP, there are templates that are all caps and ORANGE, like MEMBERINFO and others that are just lower case, does this mean anything???
|
Templates in all upper case are main templates. Basicly they are the template called at the end of the page, the main template contains all the code generated by other templates evaled durring page execution.
Basicly if you have this:
PHP Code:
// parse some templates
eval('$foo = "' . fetch_template('foo') . '";');
eval('$foo2 = "' . fetch_template('foo2') . '";');
eval('$foo3 = "' . fetch_template('foo3') . '";');
eval('$foo4 = "' . fetch_template('foo4') . '";');
It would output nothing, but lets asume we have a main template called FOODISPLAY in the database that contains the following:
HTML Code:
<html>$foo<br />$foo2<br />$foo3<br />$foo4</html>
So we would call it like this:
PHP Code:
eval('print_output("' . fetch_template('FOODISPLAY') . '");');
The print_output function dose a few things, like flush the php buffer for instance and ensures all php is ended.