Categories > TinyButStrong general >

[onload;script=[var.script_file]] Where "script_file" is output from another template

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: davidc
Date: 2005-02-23
Time: 03:02

[onload;script=[var.script_file]] Where "script_file" is output from another template

I'm having a problem using this syntax and getting both pages to display.  Currently, only the 'onload' script will display.  Is it because I'm loading TBS twice?  I wouldn't think so because I'm creating two different instances of the class.

My include script looks something like this:
<?
$nav_arry[] = arrary('location' => 'href_locationx', 'label' => 'Labelx');
$nav_arry[] = arrary('location' => 'href_locationy', 'label' => 'Labely');

$TBS = new clsTinyButStrong;
$TBS->LoadTemplate('templates/navbar.tpl.html');
$TBS->MergeBlock('nav', $nav_arry);
$TBS->Show();
?>

My main script looks something like this:
<?
$navigation = "include_script";

... other vars to process ...

$TBS = new clsTinyButStrong;
$TBS->LoadTemplate('templates/general.tpl.html')
;$TBS->Show();
?>

The include_script template is the one that displays only when the 'main_script' is called.  The main script template has a definition for the include_script as follows:

[onload;script=[var.navigation];getob]

What am I doing wrong?  I don't think it's a path problem, because if I take out the above definition, it prints the main_script output.  If I load just the navigation script, it looks right.  It's only when I try to combine them.
By: davidc
Date: 2005-02-23
Time: 03:04

Re: [onload;script=[var.script_file]] Where "script_file" is output from another template

Just realiized I left out the:

'include_once("tbs/tbs_class.php");'

But it is in the scripts, otherwise nothing would show up when I load each separately.

Sorry for the extra post.
By: Col
Date: 2005-02-23
Time: 04:11

Re: [onload;script=[var.script_file]] Where "script_file" is output from another template

I think I understand your problem . . .

In your include script add:
$TBS->Render = TBS_OUTPUT;
before your $TBS->Show();
By: davidc
Date: 2005-02-23
Time: 04:26

Re: [onload;script=[var.script_file]] Where "script_file" is output from another template

You da man Col!  I would have never thought to include that property in my script.