Mam mały problem z systemem PHPTAL. Dla przykładu: Podzieliłem stronę na 3 pliki:
index.php
config.php
test.php
index:
<?php include_once('config.php'); $template = new PHPTAL('tpl/index.html'); $template->setPhpCodeDestination('../tpl/'); $template->isError = 0; include('test.php'); ?>
test.php
<?php if( /* coś */ ) { /* kawałek kodu */ } else { $template->error = 'blabla'; $template->isError = 1; } ?>
Zmienne podane w test.php nie przechodzą do index.php w efekcie czego szablon ich nie uwzględnia. Co zrobić aby działało to poprawnie?