|
I've tried approaching a php based template multiple ways, but it never seems very efficient to me. And I don't want to use page id's, to make the pages more google and user friendly. So I was thinking of doing this:
<?php
$title = "My site - the test page";
$keys = "site, test, page, testing, template";
$desc = "This is the template test page.";
$head = "Test Page";
$date = "December 5, 2003";
$author = "SagaLore";
include ("master.php");
?>
The master.php file would then load the template - CSS, header, footer, menu, and the body. The above code would be an index.php file within a dedicated folder. And then another body.htm file would be in the folder that is loaded by default, plus all the images and whatever other objects I might reference. This way for every page I have, I actually have a folder.
So I was thinking, that's a pretty cool way to do it. But then I was thinking of a way to make menu generation easier. So I was looking at some directory listing scripts... I think there is a way for me to list just the folders, and exclude any folders that start with an underscore (marked as a work in progress). That way I can let that menu script do it's thing instead of having to manually update it all the time. But then I was thinking, if my site got a lot of hits, that would be some major processing time, wouldn't it? Is there an easier way? Maybe I shouldn't be so lazy?
|