Categories > TinyButStrong general >

How to use 2 templates?

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: DHMH
Date: 2009-11-07
Time: 14:10

How to use 2 templates?

Hi,
thanks for your nice TinyButStrong class!
Can you help me with this problem:
Why isn't this working:
$tmpl->LoadTemplate($tplpath . 'mypc_header.html') ;
$tmpl->LoadTemplate($tplpath . 'mypc_footer.html') ;
(only a snippet)
Its not working..
It only includes the mypc_footer.html...
thx in advance!
lg DHMH
By: Skrol29
Date: 2009-11-09
Time: 00:18

Re: How to use 2 templates?

Hi,

By default, LoadTemplate() is replacing the current loaded template.
Bu you can use :
$tmpl->LoadTemplate($tplpath . 'mypc_footer.html', '+');
This will add the sub-template after the loaded template.
You can also use sub-template as an external file. See sub-template in the manual.