I'm building a new site. All content will come from a db. There will be a very limited client interface for entering content into one of three templates. I'm in the brainstorming stage right now and I'd like some opinions, please.
db set up with each page having a record:
id, template reference, parent page, title, topic, description, keywords, author, content...maybe some more stuff.
each time a new page is created, I use php to enter above data into db, then create a file named index inside a directory named $title within the $parent dir...etc back to root.
That file will have only 4 lines and it will look like this:
code:
<?php
$id=43;
include '/inc/general.inc';
?>
general.inc then, when called, applies the id to an sql statement, figures out the correct template, includes it, then fills it with the appropriate data from the db.
It seems logical enough. The db makes it efficient. The links stay nice and search engine readable, I can easily and dynamically write meta data for each page...I can't think of anything wrong with this approach.
From a security standpoint, from a usability standpoint, from a maintenance standpoint, from any standpoint you want; is this a sound plan?
Anybody see any flaws? Room for improvement?
Thank you