Author Topic: [How To] Add a NEW Static Page to v2  (Read 16203 times)

Shawn

  • Hero Member
  • *****
  • Posts: 2624
[How To] Add a NEW Static Page to v2
« on: June 05, 2008, 08:18:03 PM »
There used to be instructions on how to do this somewhere the forum, but for the life of me I can't find them.

How to Add a New Static Page to v2.

Open page.php in your favorite text or WYSIWYG editor.  Look for this:
Code: [Select]
    case 1:
    $which_page = 'generic_aboutus.htm';
    break;

    case 2:
    $which_page = 'generic_contactus.htm';
    break;
   
    case 3:
    $which_page = 'generic_terms.htm';
    break;
   
    case 4:
    $which_page = 'generic_advertise.htm';
    break;

The case numbers represent what the page number will be in the URL.  Example Case 1 = generic_aboutus.htm which has a URL "http://yoursite.com/page.php?page=1   :)

We're adding a new page, so we'll need to add a new case (Case 5).  Now our page.php file looks like this:
Code: [Select]
    case 1:
    $which_page = 'generic_aboutus.htm';
    break;

    case 2:
    $which_page = 'generic_contactus.htm';
    break;
   
    case 3:
    $which_page = 'generic_terms.htm';
    break;
   
    case 4:
    $which_page = 'generic_advertise.htm';
    break;

    case 5:
    $which_page = 'generic_YOURNEWPAGE.htm';
    break;
The URL for your new page will be http://yoursite.com/page.php?page=5

Now in your templates folder, create a new file called generic_YOURNEWPAGE.htm.  You can create a new blank html file, or you can make a copy of one of the other generic_xxx.htm files (ie generic_aboutus.htm).

Now enter your  content into the new generic_YOURNEWPAGE.htm file.


Finally you'll need to open main_1.htm and add a link to your new page.  Look for this:
Code: [Select]
  <div id="MainFooter_Container">
    <p><br />
      <a href="page.php?page=1"><br />
    About us</a> | <a href="page.php?page=2">Contact Us</a> | <a href="page.php?page=3">Terms</a> | <a href="page.php?page=4">Advertising</a></p>
    <p>Additional information can be added here</p>
  </div>

Add your new link so that it looks like this:
Quote
  <div id="MainFooter_Container">
    <p>

      <a href="page.php?page=1">
 About us[/url] | <a href="page.php?page=2">Contact Us[/url] | <a href="page.php?page=3">Terms[/url] | <a href="page.php?page=4">Advertising[/url] | <a href="page.php?page=5">YOUR NEW PAGE[/url][/color]</p>
    <p>Additional information can be added here</p>
  </div>