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

    Join Date
    Apr 2009
    Posts
    157
    Rep Power
    89

    Site navigation concept


    Hi,

    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.
    Cheers
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Jun 2009
    Posts
    721
    Rep Power
    7
    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