Jump to content

CMS Structure


roadie

Recommended Posts

Hi guys!

I start learning PHP a year ago or so, followed few tutorials, created a simple CMS and now I want to start my first BIIIIIG project, just for learning. There are LOTS of things I don't know yet, and I'd appreciate your help. I don't know any OOP so I'd like to do it in procedural way.

 

I want to create a CMS that will look something like this:

 

| Home | About | Classifieds | News | Whatever | Contact |

 

The structure I'm thinking is:

Sections

      Categories

          Pages

 

The top menu is created by fetching all the Sections from the database with a function "display_top_menu()" + |Home| -index.php

 

|About| -1 level- Section - 1 single page

|Classifieds| - 3 levels - Section -Categories-Pages

|News| -2 levels -Section - Pages

|Contact| - 1 level- but I want to be able to add some custom code, to display the contact form for example

 

 

My questions are:

1. How can I make the Sections to display differently? Adding a field "type" or "view" in the section table will help? Is this the right way?

      ex: type1 (About) -display full article belonging to this section

            type2 (News) -display a list of articles belonging to this Section with links to the the full article

            type3 (Classifieds) -display a list of categories with links to Category1, Category2,...

            type4 (Contact) - custom code

2. Is it ok that all this code to run on a single page which I'll call it "content.php", for example? Or I should create separate pages, for each type?

 

2. The Home page has to be a Section also, or not?

 

I hope you can understand me. I don't know most of the programming terminology....

 

 

Roadie

 

 

 

           

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.