oraz 2 kod php:
$str = $_GET['panel']; if($str == '') { include('page/news.php'); $stronadocelowa = SZABLON_PELNA_SCIEZKA . 'news.tpl'; $smarty->assign("stronadocelowa", SZABLON_PELNA_SCIEZKA . 'news.tpl'); } else { { include('page/'.$str.'.php'); $stronadocelowa = SZABLON_PELNA_SCIEZKA . ''.$str.'.tpl'; $smarty->assign("stronadocelowa", SZABLON_PELNA_SCIEZKA . ''.$str.'.tpl'); } else { include('page/news.php'); $stronadocelowa = SZABLON_PELNA_SCIEZKA . 'news.tpl'; $smarty->assign("stronadocelowa", SZABLON_PELNA_SCIEZKA . 'news.tpl'); } }
i mam taki problem że jak zmienię stronę to w php zemienia się wszystko a na stronie w smartach nie jest dalej ta sama strona co była co musze zrobić żeby się automatycznie odświeżała ?
i jeszcze pokazuje mi się strona :
Kod
Smarty Debug Console - Total Time 0.02711
included templates & config files (load time in seconds)
theme\mit2\header.tpl (compile 0.00000) (render 0.00000) (cache 0.00067)
theme\mit2\left.tpl (compile 0.00000) (render 0.00000) (cache 0.00087)
theme\mit2\center.tpl (compile 0.00000) (render 0.00000) (cache 0.00075)
theme\mit2\footer.tpl (compile 0.00000) (render 0.00000) (cache 0.00065)
assigned template variables
$SCRIPT_NAME Smarty_Variable Object (3)
->value = "/skill/panelsmarty/index.php"
->nocache = false
->scope = "Global"
$sesja Smarty_Variable Object (3)
->value = "zle"
->nocache = false
->scope = "Smarty root"
$stronadocelowa Smarty_Variable Object (3)
->value = "theme/mit2/news.tpl"
->nocache = false
->scope = "Smarty root"
$title Smarty_Variable Object (3)
->value = "strona by mit2"
->nocache = false
->scope = "Smarty root"
$zliczhelp Smarty_Variable Object (3)
->value = 0
->nocache = false
->scope = "Smarty root"
assigned config file variables (outer template scope)
included templates & config files (load time in seconds)
theme\mit2\header.tpl (compile 0.00000) (render 0.00000) (cache 0.00067)
theme\mit2\left.tpl (compile 0.00000) (render 0.00000) (cache 0.00087)
theme\mit2\center.tpl (compile 0.00000) (render 0.00000) (cache 0.00075)
theme\mit2\footer.tpl (compile 0.00000) (render 0.00000) (cache 0.00065)
assigned template variables
$SCRIPT_NAME Smarty_Variable Object (3)
->value = "/skill/panelsmarty/index.php"
->nocache = false
->scope = "Global"
$sesja Smarty_Variable Object (3)
->value = "zle"
->nocache = false
->scope = "Smarty root"
$stronadocelowa Smarty_Variable Object (3)
->value = "theme/mit2/news.tpl"
->nocache = false
->scope = "Smarty root"
$title Smarty_Variable Object (3)
->value = "strona by mit2"
->nocache = false
->scope = "Smarty root"
$zliczhelp Smarty_Variable Object (3)
->value = 0
->nocache = false
->scope = "Smarty root"
assigned config file variables (outer template scope)