jbezweb
10-06-2005, 02:41 PM
Hi,
I need to make a dynamic sitemap for a CMS.
All pages are stored in a DB.
I have pulled all info out into these arrays
PageIds - all pages ids
PageNames - all page names
ParentPages - Parent page of corresponding page (id #'s, except 'root' indicating top level page).
(eg. PageIds[0] is a sub page of ParentPages[0], if ParentPages[0] = 'root' then it is the top, 1st, level)
I need it to support an infinate number of levels. My guess is that it needs to be done in a loop but can't seem to figure out how get it to work.
it should look like this:
Root Page
-Sub Page
-Sub Sub Page
-etc
Any help or direction is greatly appreciated.
I need to make a dynamic sitemap for a CMS.
All pages are stored in a DB.
I have pulled all info out into these arrays
PageIds - all pages ids
PageNames - all page names
ParentPages - Parent page of corresponding page (id #'s, except 'root' indicating top level page).
(eg. PageIds[0] is a sub page of ParentPages[0], if ParentPages[0] = 'root' then it is the top, 1st, level)
I need it to support an infinate number of levels. My guess is that it needs to be done in a loop but can't seem to figure out how get it to work.
it should look like this:
Root Page
-Sub Page
-Sub Sub Page
-etc
Any help or direction is greatly appreciated.