CMS navigation structure

Discussion in 'MySQL' started by RootShell, Jul 12, 2007.

  1. #1
    I'm not sure if I should post in PHP or Databases with this one.

    I'm about to embark on a project involving the build of a content management system (MYSQL + PHP).

    Have decided on a list of functionality and features which need to be included and now am thinking through the build and operation of the whole thing.

    I'd like to be able to provide a multi tier navigation system.

    I'm planning for a table cmsContent to contain the following fields (I'll just list those relevant to this discussion)
    pageID
    pageNAME
    pagePARENT

    the value of pagePARENT may be NAV_MAIN_MENU, NAV_INDIVIDUAL, or a 'pageNAME' value.

    This allows a hierarchy to begin being created ie; a page with pageNAME 'steven' might have a pagePARENT 'the_team', pageNAME 'the_team' has pagePARENT 'about_us', pageNAME 'about_us' has pagePARENT 'NAV_MAIN_MENU'

    I'm now trying to establish the best way of tracing this heirarchy from the page root so that I can create navigation links and create a breadcrumb trail.

    <a href="/about_us/the_team/">Meet the team</a>
    <a href="/about_us/the_team/steven/">Steven Brown</a>

    (I'll be using mod_rewrite to deal with URL's in the manner above.)

    What are your thoughts on the best way to achieve this?

    I was also wondering if there would be any use in adding a field pageTIER with a numerical value to check how deep into the navigation tree a page resides?
     
    RootShell, Jul 12, 2007 IP