hi,
In this case there are two things to consider:
- How does it work for you, when maintaining, expanding & revising the site
- How does it affect the server
I think that for the 2 structures you describe the server-side differences are not all that big. The main differences would be that the second option most likely has a [man]switch[/man] that will result in different scripts to be loaded.
I personally prefer to have individual pages for individual action. Also, it makes it clearer for the users of your site what they are looking at (When browsing, I usually look at the URL of a link before going there). But that is a choice you might have to make for yourself.
oh; I htink I already answered your second question: Based on categoryid there pages load a different set of routines to show a page.
The structure you are using now seems fine; It is roughly what I do for most of my sites. (I have a layout page, which holds the basic structure for that site. Then a menu generating script, a header and a footer. The main body of the site generates the header by calling the header() script, the footer() and the menu(). Then it generates the bulk of the content, and parses the layout file to spit out the final page.
On top of that I have a caching system: I cache all my output files. Although it doubles my diskspace, it lowers the loading on my server. Whenever I load a page, I verify that the main contents has not changed through a timestamp field. If it hasn't, and the cache exists, I send the cache, else I generate the cahce and send it.