I have default template file (main.tpl) and I want to include subpages between <body> tags.
So when user clicks for expample on link News, it’ll show news.php ($smarty->display(“news.tpl”);) combined with main.tpl
–> 1st part of main.tpl + news.tpl + 2nd part of main.tpl.
News.tpl would contain some text and php code, nothing else. Eg.
Hello, <php echo $username ?>. Some random text.
In PHP assign template name to smarty variable:
In main.tpl just include module template:
You can find more about
{include}smarty function here: http://www.smarty.net/docs/en/language.function.include.tpl