Subscript php cannot see vars from its template!

From: Date: Wed, 15 May 2002 10:54:58 +0000
Subject: Subscript php cannot see vars from its template!
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-4198@lists.php.net to get a copy of this message
I have strange problem with variables passed to subtemplate. file main.tpl: {include file="test.tpl" myVar="A"} {include file="test.tpl" myVar="B"} {include file="test.tpl" myVar="C"} file test.tpl {include_php file="test.php"} myVar is {$myVar}, file test.php <?php print_r($this->_tpl_vars['myVar']);?> Variables seems to pass correct to test.tpl because I can see result: myVar is A, myVar is B, myVar is C, The problem is: file test.php cannot see all values of myVar from its template test.tpl (which got it from main.tpl). From test.php value "A" is visible only. It is displayed 3 times instead of others values: "B" and "C". How to solve it? I set caching off ($smarty->caching = false) but it did not help. I am using PHP 4.2 as CGI on Win2000 srv and the latest Smarty 2.2.1. -- Johann

« previous php.smarty.general (#4198) next »