Best design for Article Directories


I was wondering if anyone had any advice or ideas on how the best way to set up articles on a website? Or possibly point me in the right direction to some good resources on the subject?


best design: one web page per article

So the best would be to design a static page for each article and name the page the same as the article name?

I suppose then I could store the name, category, path etc. in a DB to generate links on specific pages with specific articles dynamically.

This might seem like a trivial question…but what if I just put the article itself in a HERE doc, in it’s own file and just include it in a multipurpose page(say articles.php) depending on which generated link the user clicked(with a query string identifying it in the DB)?

Would that be more overhead on queries and screw with the search bots?


oh dear me :slight_smile:

you seem to have asked a very general question about back end construction of a dynamic storage mechanism for an article directory

i seem to have answered a different question


I don’t have a large amount of articles yet. I am just starting out but just wanted to know what the best practice would be with as little maintenance as possible down the road.

I guess I am asking if it would be better to store the articles in a DB all formatted for html and just pull them out on demand or build the pages all individually and just generate the links to them.

Thanks again!

this depends on the complexity of the html

Here is what I initially thought…Create a directory name articles with a default index page and put the actual articles in a sub directory named by subject.
-more articles…
-more articles…

The actual articles would then just be in a here doc all formatted for output.
print <<<HERE
<div id=“someCSSClass”>
<h1>How to get foo</h1>
<p>This is how you can get <a href=“#”><strong>foo</strong> </a>etc…</p>



Then make a table for articles with the name, src, category etc, so depending on the page I can generate random links by category depending on which page they are in and adding the article source to the query string.
Example on the foo page:
…All the db code here…The query would be specific to the page’s subject
while($row = mysql_fetch_array($result)){

print “<a href =\”…/articles/?art_src=$row[art_src]\">$row[art_name]</a><br/>

Where art_src would be foo/how_to_get_foo.php

So then on the default article page I would run a check to see if $_GET[art_src] was set and if it was put it to a shortcut var $art_src=$_GET[art_src]

and then…

include “$art_src”;

else {
output the standard page

Then have the directives for bots to not go into any of the actual article pages to get indexed(This is where I am not quite sure how articles would get indexed because of them being generated by the query string). The html would just be for all the styles, anchors and such.

Hope this explains what I was thinking better. Thanks again!