I got the error saying "SmartyException' with message 'Missing template name...".
I'd love to show the different page using display() in Smarty. I get the value from the url and deferenciate the page.
I tried concatenate the single quote, but it doesn't really work.
Any helps appreciate.
index.html , confirm.html , finish.html exist in contact folder in a template directory.
switch($_GET['param']) {
case 1: confirmation();
break;
case 2: send_email();
break;
case 3: finish();
break;
}
function confirmation(){
echo 'index page';
//$smarty->assign('css', "contact");
//$smarty->display('contact/index.html');
$url = ''contact/index.html'';
}
function send_email(){
echo 'confirmation page';
//$smarty->assign('css', "contact");
//$smarty->display('contact/confirm.html');
$url = ''contact/confirm.html'';
}
function finish(){
echo 'finish page';
//$smarty->assign('css', "contact");
//$smarty->display('contact/finish.html');
$url = ''contact/finish.html'';
}
//
$smarty->assign('css', "contact");
//$smarty->display('contact/index.html');
$smarty->display($url);
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…