mam index.tpl oraz panel.tpl
Kod
$smarty = new smarty;
$smarty->template_dir = "style/";
$smarty->compile_dir = 'smarty.temp/templates_c/';
$smarty->config_dir = 'smarty.temp /configs/';
$smarty->cache_dir = 'smarty.temp /cache/';
$smarty->template_dir = "style/";
$smarty->compile_dir = 'smarty.temp/templates_c/';
$smarty->config_dir = 'smarty.temp /configs/';
$smarty->cache_dir = 'smarty.temp /cache/';
teraz do zmiennych zapisuje to co ma sie pojawic w index.tpl
Kod
$zmienna1 = "jakis tekst";
wywoluje zmienna
Kod
$smarty->assign('zmienna', $zmienna1);
$smarty->display('index.tpl');
$smarty->display('index.tpl');
a teraz chcialbym zeby w pliku index.tpl w miejsce powiedzmy {$panel} wstawialo mi zawartosc strony panel.tpl jak moge tego dokonac?
probowalem tworzyc nowa klase smarty i wpisywac display('panel.tpl') lecz to nic nie daje.. moze jest jakis dobry sposob do wykonania tego? jak cos nie zrozumiale napisalem to prosze pytac. thks