I am working on a site with at least 1,000 pages that are in a tree structure with at least 6 levels (MySQL database). Some of the pages have content and some of them are just directories of the pages beneath it.
Apes
-- Grandpa
----- Mom
-------- Jimmy
----------- Doll
----------- Teddy Bear
-------------- Button
-------- Lucy
-------- Bobby
-- Grandma
----- Mom
-------- Bobby
----------- Crafts
----- Dad
-------- Billy
----------- Trucks
Starting off, I structured the database so that each entry had the following:
pageID - Unique ID for the page
pageTitle - Name of the page
pageLevel - The level of the page (1-6)
prevLevelID - The page ID of the level above it.
pageInclude - The file to be included.
I was a little tentative about this structure, but it worked ok until I needed to print out a site map in a tree format. The number of queries is out of this world...
If anyone has any suggestions for printing out the site map, I would appreciate it. Or...better yet...if anyone has come up with a good solution for a similar situation, I would love some alternative ideas.