CODE
<?
$PageTitle = "My Page";
$articleDescription = "This is my page";
$articleTitle = "All about my page";
$articleKeywords = "my page";
$articleBody ='<strong>Welcome to my page.<br>
This is <a href="http://www.google.com" target="_blank">Google</a>!</strong>';
?>
$PageTitle = "My Page";
$articleDescription = "This is my page";
$articleTitle = "All about my page";
$articleKeywords = "my page";
$articleBody ='<strong>Welcome to my page.<br>
This is <a href="http://www.google.com" target="_blank">Google</a>!</strong>';
?>
Next, we design a template and enter our variables where we want them. As an example and to save space, here is a very plain template. For our article above we'll name it my_page.php
CODE
<? include ("article.php"); ?>
<html>
<head>
<title><? echo "$pageTitle"; ?></title>
<META NAME="description" CONTENT="<? echo "$pageDescription"; ?>">
<META NAME="keywords" CONTENT="<? echo "$articleKeywords"; ?>">
<META NAME="revisit-after" CONTENT="7 days">
<META NAME="robots" CONTENT="index, follow">
<META NAME="rating" content="general">
<META NAME="distribution" content="global">
</head>
<body>
<p><? echo $articleTitle; ?></p>
<p><? echo $articleBody; ?></p>
</body>
</html>
<html>
<head>
<title><? echo "$pageTitle"; ?></title>
<META NAME="description" CONTENT="<? echo "$pageDescription"; ?>">
<META NAME="keywords" CONTENT="<? echo "$articleKeywords"; ?>">
<META NAME="revisit-after" CONTENT="7 days">
<META NAME="robots" CONTENT="index, follow">
<META NAME="rating" content="general">
<META NAME="distribution" content="global">
</head>
<body>
<p><? echo $articleTitle; ?></p>
<p><? echo $articleBody; ?></p>
</body>
</html>
Such a simple template system as the above can be expanded upon to use mySQL to store all the info instead of the first file listed above. But, for a quick and dirty way of getting a large number of pages up in a short time, this works pretty well.
But now you're probably saying, "ok, now I have 100 pages all ready to upload. What about an index page?" No problem! We'll make the index.php like this
CODE
<? $indexTitle = "My Page Index";
$pageDescription = "This is my page index";
$pageKeywords = "my page,my index';
$articleTitle1 = "My 1st Article";
$articleLink2 = "my_article_1.php;
$articleDecrip_1 = "Learn all about apples and oranges";
$articleTitle2 = "My 2nd Article";
$articleLink2 = "my_article_2.php;
$articleDecrip_2 = "Learn all about peaches and pears";
$articleTitle3 = "My 3rd Article";
$articleLink2 = "my_article_3.php;
$articleDecrip_2 = "Learn all about rocks and rolls";
<html>
<head>
<title><? echo "$indexTitle"; ?></title>
<META NAME="description" CONTENT="<? echo "$pageDescription"; ?>">
<META NAME="keywords" CONTENT="<? echo "$pageKeywords"; ?>">
<META NAME="revisit-after" CONTENT="7 days">
<META NAME="robots" CONTENT="index, follow">
<META NAME="rating" content="general">
<META NAME="distribution" content="global">
</head>
<body>
<a href="<? echo $articleLink1 ?>"><? echo $articleTitle1; ?><br>
<? echo $articleDescription1; ?><br><br>
<a href="<? echo $articleLink2 ?>"><? echo $articleTitle2; ?><br>
<? echo $articleDescription2; ?><br><br>
<a href="<? echo $articleLink3 ?>"><? echo $articleTitle3; ?><br>
<? echo $articleDescription3; ?><br><br>
<!-- you can add more pages by doing this -->
<a href="index.php">1</a> - <a href="index-2.php">2</a> - <a href="index-3.php">3</a>
</body>
</html>
$pageDescription = "This is my page index";
$pageKeywords = "my page,my index';
$articleTitle1 = "My 1st Article";
$articleLink2 = "my_article_1.php;
$articleDecrip_1 = "Learn all about apples and oranges";
$articleTitle2 = "My 2nd Article";
$articleLink2 = "my_article_2.php;
$articleDecrip_2 = "Learn all about peaches and pears";
$articleTitle3 = "My 3rd Article";
$articleLink2 = "my_article_3.php;
$articleDecrip_2 = "Learn all about rocks and rolls";
<html>
<head>
<title><? echo "$indexTitle"; ?></title>
<META NAME="description" CONTENT="<? echo "$pageDescription"; ?>">
<META NAME="keywords" CONTENT="<? echo "$pageKeywords"; ?>">
<META NAME="revisit-after" CONTENT="7 days">
<META NAME="robots" CONTENT="index, follow">
<META NAME="rating" content="general">
<META NAME="distribution" content="global">
</head>
<body>
<a href="<? echo $articleLink1 ?>"><? echo $articleTitle1; ?><br>
<? echo $articleDescription1; ?><br><br>
<a href="<? echo $articleLink2 ?>"><? echo $articleTitle2; ?><br>
<? echo $articleDescription2; ?><br><br>
<a href="<? echo $articleLink3 ?>"><? echo $articleTitle3; ?><br>
<? echo $articleDescription3; ?><br><br>
<!-- you can add more pages by doing this -->
<a href="index.php">1</a> - <a href="index-2.php">2</a> - <a href="index-3.php">3</a>
</body>
</html>
and there's your template/guideline for making an index page for all your articles.


