• # March 19, 2013 at 6:14 pm

    The menu can’t be simple html, else you wouldn’t get parse errors.

    # March 19, 2013 at 6:14 pm

    Yeah. I tried the above php method, but it didn’t do anything. It just cause some php perrors. I can try it again…

    # March 19, 2013 at 6:15 pm

    This reply has been reported for inappropriate content.

    By the way, I’m surprised this hasn’t come up already…

    I assume you will have a root variable for your site’s root directory (I’ll call it “$root”):

    if( !isset( $_GET ) )
    $page = ‘home’;
    $page = $_GET;
    if( file_exists( $root . ‘theme/default/pages/’ . $page . ‘.php’ ) )
    include( ‘theme/default/pages/’ . $page . ‘.php’ );
    include( ‘theme/default/pages/404.php’ );

    # March 19, 2013 at 6:20 pm

    Oh, I see the problem… I need to specify that the default index page uses home.php

    # March 19, 2013 at 6:27 pm

    Ok, so my default page is ‘home’, so how would this be written? The above code you gave didn’t change anything.

    # March 19, 2013 at 6:41 pm

    When going directly to I get errors. If I go to I no longer have any errors. Any suggestions?

    # March 19, 2013 at 7:15 pm

    It seems that I need to set the default page within the navigation, which should be ‘home’. Anyone know how to achieve this?

    # March 19, 2013 at 7:32 pm

    This reply has been reported for inappropriate content.

    My suggestions seem to be following a theme. If you’re still having difficulties, I’m happy to put together a working zip file.

    # March 19, 2013 at 8:09 pm

    This reply has been reported for inappropriate content.

    Here’s a zip file anyways:

    I used a sub-folder rather fiddling with my hosts, so the htaccess file has a line reading:

    RewriteBase /rpotterjr/

    You will either need to unzip the folder to:

    or just change the line to:

    RewriteBase /

    # March 20, 2013 at 2:53 am

    It is saying ‘Unidentified Index Page…” It’s saying that there is no identified index page in navigation.php?

    # March 20, 2013 at 6:45 am

    Add `$page = isset($_GET) ? $_GET : ‘home’;` (if you haven’t declared `$page` somewhere else already) before the list and replace all the `$_GET` with `$page` inside the list.

    # March 20, 2013 at 12:01 pm

    Thanks again man, you definitely rock! Thanks goes out to BenWalker also, for contributing to solving this issue.

    # March 20, 2013 at 12:24 pm

    One more thing, in your switch you default to your home page. I would default to a 404 error page like this:

    $page = isset($_GET) ? $_GET : ‘home’;

    // include header and menu here (so they have access to $page)

    switch ($page) {
    case ‘home’:
    case ‘about’:
    case ‘contact’:

    // include footer here

    # March 20, 2013 at 1:28 pm

    Yeah, I plan to do that before completion of the website. I have a 404 template that I use for all of my websites that I usually impliment before I put the site live. Thanks for everything!

Viewing 15 posts - 46 through 60 (of 70 total)

You must be logged in to reply to this topic.