It will work better with :
main html file:
[tbs_include.onload;file=header.tpl;htmlconv=no]
thats the Title up there, oh joy
</body>
</html>
|
'htmlconv=no' is very usefull in your case because TBS try to include only the body part by default.
Other code are ok.
Some tips :
1:
Instead of
$PAGE->MergeField("subtemplatetitle", $title);
you can just use [var.title] in the sub-template and all is automatic.
[var.title] will work in the main template and the sub template as well.
2:
If you need, thename of the file can be stored in a php variable.
For example:
[tbs_include.onload;file=[var.header];htmlconv=no]