Ok.
Kako iz smarty-a pozvat ovakau PHP klasu
Code:
<?PHP
class Section
{
function vrati_header()
{
return "NOVOSTI";
}
function vrati_file()
{
return "novosti.tpl";
}
}
?>
<?PHP
class Section
{
function vrati_header()
{
return "NOVOSTI";
}
function vrati_file()
{
return "novosti.tpl";
}
}
?>
te sad unutar tpl-a.
{PHP}
include ("php_classes/switch_case");
$Section = new Section()
$path = $Section -> vrati_file(); // npr. novosti.tpl
////////// i sad bi tu neku komandu kao {include file = $path}
{/PHP}
ili da se bar taj $path vidi izvan {PHP} komandi
xxxrugby: "We are all philosophers, when question is about politics!"