1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2009
    Rep Power

    Site navigation concept


    In the past I have always done my site nav using a switch statement applied to a $_GET['nav'] to determine content to display.

    I am about to start a new project and wanted to know what the current preferred method of managing site navigation was.
  2. #2
  3. No Profile Picture
    Super Moderator
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Jun 2009
    Hartford, WI
    Rep Power
    Using switch is just fine as long as the design of the site is rather simple/basic. If you plan on making it a bit larger with more functionality, your best bet is structuring it with modules. Then, in place of your switch, you'll simply have the main index file which is always ran, and will fetch a variable from your address bar to define location. Doing so will tell your script which module file/folder to include and load the page from.

IMN logo majestic logo threadwatch logo seochat tools logo