3
Smarty display multiple template pages with single php page
<?php
//sample link: <a href="page.php?page=contact">Contact</a>
$smarty->display('header.php');
$page = (isset($_GET['page']))?$_GET['page']:'';
switch($page) {
case 'contact':
$smarty->display('contact.php');
break;
case 'termsofuse':
$smarty->display('termsofuse.php');
break;
}
$smarty->display('footer.php');
?>
rated 3 times
(3)
(0)
comments: 0 / hits: 2240
/ 4 years ago, wed, jul 26, 17, 01:03:20
More From
» PHP
Comments
There are no comments for this Snippet yet
Only authorized users can post. Please sign in first, or register a free account