Till now there is only one drawback and that is that the title in the subject must be the same at all times. This can be easilty solved with a bit of php. PHP can be put in front of the HTML code. It also can contain varibles. I have a subject in my text that should be as the subject of the window as well. I also have the text. So here is how I solved it.
The order normaly is to include start.inc, then the text and then end.txt. What I first do is change the order. I still need the text in between the start.inc and end.inc. So end.inc will look like this:
<?php
print "$COMPLETE_TEXT";
include("copyright.php\");
include("footer.inc");
?>
To get the page to print the "$COMPLETE_TEXT" part, I need to define it. So I place $TEXT=" in front of the text and "; after it. See also that you escape (putting a \ in front of it) for special caracters like " and \; and $
The Title is also easy. Name it $TITLE="Some final touches". Next you need to change header.inc to read the follwoing
<title><?php print $TITLE; ?></title>The complete page will look like:
<?php
$TITLE="Some final touches";
$TEXT="
Lorem ipsum ...
";
$BEGIN="<div id=\"text\">;
$END="</div>";
$COMPLETE_TEXT=" <h1>$TITLE</h1> $TEXT $END";
include("start.inc");
include("end.inc");
?>
Conclusion, so one more page to go.
© 2005 - 2012
by
houghi.
Copyright explanation will be online on
February 13, 2012