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