My first website is about ready to go live, and I have discovered that I need some major help figuring out how to "architect" expanding Site Content?! (BTW, my website is home-grown, and I have no desire to using something like WordPress!!) Right now I just have a directory called "articles" and in it I have several supporting scripts which relate to an Article. (The Articles themselves are in MySQL.) What I designed works great - for now - but as I get more and more Articles, I will want to break things out into Sections. (And like most things in business, I won't know exactly what I need until I get there?!) What I am thinking, though, is that I would like to have "Sections" for my website like a newspaper has (e.g. Local, National, Sports, Money, Lifestyles, etc.) This entire topic has my head spinning, but I guess the purpose of this thread is to ask this... Would it be a good or bad idea if I create a directory for each "Section" of my website (and then stick an "index.php" file in each one and use that as a page which lists Articles for that Section? If I only had a few Sections and things didn't change much, that seems like the way to go, but if I have maybe 15 Sections, and things change with some frequency, I am thinking that may "paint me into a corner"?! Let it be known that I am pretty much a novice, and so offering me some fancy Object-Oriented Dynamic Framework for a solution would be over my head!! Hopefully my problem is not a new one, and some experts out there can offer some practical - and not too hard to implement - solutions for my dilemma?! Thanks, Debbie
Why can't you just add another column to your articles table and link it to a table containing categories (or sections, as you call them) ? You will have the ability to remove them, add new ones and edit existing ones without going through all of your articles and so on.
Well, my question is more about creating physical "Sections" in my website and about having "Pretty URLs" that reflect how the Content is organized. Yes, I could add a column to my back-end table and allow people to sort/filter by whatever, but think about how real websites look and work. If you go to most online newspapers, they have navigation tabs to "Sections" like "Local", "National", "Sports", "Business", Lifestyles", etc. And each of those (Content) "Sections" has its own set of Articles and Content. (It would look *strange* to just have one web page where you filter Articles for an outward facing website.) Because I am a newbie, I don't have the skills or time to build some home-grown templating, CMS solution, but I also don't think I need that. Since this is the Apache Forum, one of my first questions would be "Is it okay to create one physical directory - with its own "index.php" - for each "Section" on my website? For now, what I am envisioning is this... 1.) Keep this current structure... WebRoot - articles index.php add_comment.php edit_comment.php join_thread.php manage_threads.php rate_article.php Code (markup): 2.) Add a new directory for each Section... WebRoot - finance index.php - management index.php - operations index.php - marketing index.php Code (markup): ...and just use these to list Articles for each section 3.) Wherever an Article exists, code the hyperlink like this... http://local.debbie/finance/postage-meters-can-save-you-money ...and use my mod_rewrite to re-direct it to my original code like this... http://local.debbie/articles/article.php?slug=postage-meters-can-save-you-money 4.) If a User clicks on one of the "Article Features" links, then just keep my current Pretty URL structure like this... http://local.debbie/articles/edit-comment/postage-meters-can-save-you-money/DoubleDee/2 I'm sure this sounds pretty convoluted, but it is the best I can come up with?! Thanks, Debbie