Pages created as template files? Doesn't seem to make a lot of sense. You're creating a new .tpl for each page?
If you are, substitution is really a waste of time, you'd just hard code them in I guess.
A CMS should do something like this.
-----------
RAW CONTENT.
-----------
Here we have a bunch of raw content, it can be in a database as rows of data or files (more unwieldy, but works.) This raw content has no HTML, or at best is very basic <p>'s, <ul/ol><li>'s, etc. This content is as Plain Jane text as possible, and completely devoid of formatting so we can put it where we want it.
Typical fields:
which_template_i_use
i_am_published_or_not
pagetitle
longtitle
meta_desc
meta_keywords (optional, minor)
content
widgets (sidebar content, whatever)
-----------------
TEMPLATES
-----------------
There should be only a few templates for any given site (sometimes there are many, but could be very few.) Templates are the formatting. We can now assign the fields to the format, and swap out templates at any time.
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>[PAGETITLE] | [SITENAME]</title>
<meta name="Description" content="[META_DESC]">
<meta name="keywords" content="[META_KEYWORDS]">
<link rel="stylesheet" type="text/css" href="/css/mystyle.css">
</head>
<body>
<div id="container">
<div id="main-left">
[h1>[PAGETITLE]</h1>
[CONTENT]
</div>
<div id="right-sidebar">
[SIDEBAR_CONTENT]
</div>
</div>
</body>
</html>
There's our formatting. We have separated content from formatting, and CSS separates style from markup.
----------------
SCRIPTS
----------------
This is of course the glue that binds the two together, for you, PHP, but it can be any server-side language. Using the script and based on the request, we open the requested content, temporarily hold the values in memory, open the template, insert the content, and output it to the browser.
Does this CMS work in this fashion? Where do all your pieces fit in? In order to answer your last question we have to know where the page data actually comes from.