Closed Thread Icon

Topic awaiting preservation: thinking about site structure (Page 1 of 1) Pages that link to <a href="http://ozoneasylum.com/backlink?for=6775" title="Pages that link to Topic awaiting preservation: thinking about site structure (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: thinking about site structure <span class="small">(Page 1 of 1)</span>\

 
mobrul
Bipolar (III) Inmate

From:
Insane since: Aug 2000

posted posted 08-22-2003 01:46

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

Tyberius Prime
Paranoid (IV) Mad Scientist with Finglongers

From: Germany
Insane since: Sep 2001

posted posted 08-22-2003 12:30

well... why would you cerate a whole bunch of nearly identical files, one for eache page?

just use rewriteRules to redirect em all to one php file, that converts the url into the id, and returns that.

actually, you could just store the directory in the database as well, put an index and unique on it, and use that to look up the appropriate page.

mobrul
Bipolar (III) Inmate

From:
Insane since: Aug 2000

posted posted 08-23-2003 00:41

Sounds like a good idea.
I'll investigate. Thank you.

« BackwardsOnwards »

Show Forum Drop Down Menu