By: iman
Date: 2007-05-26
Time: 18:30
|
trying to call several templates
I'm trying to call several files for my template.
I use the following code but does not work. The block does not read my files.
How can i access variable templateArray to load it as template?
[onload;file=[templateArray.val]] (i know this one does not work.. help please..)
any help would be appreciated
----------------------------------------------
require('tbs_class_php5.php');
$templatefile = array('content1.htm','content2.htm');
$tbs = new clsTinyButStrong;
$tbs->LoadTemplate('templates/main.htm') ;
$tbs->MergeBlock('templateArray',$templatefile) ;
$tbs->Show() ;
----------------------------------------------
[onload;file='header.htm']
[templateArray;block=begin]
[onload;file=[templateArray.val]]
[templateArray;block=end]
[onload;file='footer.htm']
|
By: Skrol29
Date: 2007-05-26
Time: 18:59
|
Re: trying to call several templates
Hi,
Replace:
[onload;file=[templateArray.val]]
With:
[onshow;file=[templateArray.val]]
And it should work.
The [onload] tags are processed before you call the MergeBlock() method. So paremeter "file" has not the exected value when the tag is processed in your snippet.
|
By: iman
Date: 2007-05-27
Time: 00:54
|
Re: trying to call several templates
It works now.
Thank you so much for the info master Skrol29.
|
|
Posting in progress.
Please wait...
|