I just wanted to see if the way I am constructing my website templates was the best and most dynamic way of doing it. Currently I have my website playout however for the areas that I want the content to change I use the following code.
<?
if (preg_match("/\W/",$page) || !file_exists("../$page.html")) {
include("../home.html");
}
else {
include("../$page.html");
}
?>
The navigation then links to that page by saying something like,
<a href="index.php?page=about">About</a>
Is this the best way to construct a template using PHP or are there better ways? Thankyou for the help.