How to add a new page to your script
|
09-12-2011, 12:43 PM
Post: #1
|
|||
|
|||
How to add a new page to your script
In this tutorial I will show you how to properly add a new page to your script,
when I say properly I mean; it will have the same url structure as other pages. Quote:http://www.domain.com/?option=newpage I will also show you how to add a line into your htaccess file for this new page so that you can have a link like; Quote:htt://www.domain/com/newpage First, adding our page. 1. Open the /include/functions.php file. 2. Do a text search for Quote:switch ($_GET['option']) { 3. Under that line, is where we are going to add our new page. Here is an example; Code: case "newpage": Second, adding a link to this page in the menu. 1. Open the /include/functions.php file. 2. Do a text search for Quote:function call_menuler() 3. This is our menu function, you should be able to see the structure it uses with ul and li, here is an example of adding our new page; Code: function call_menuler() { Now, you have the new page, and a menu link. Next we will add a line to the htaccess file for a neater url. (The htaccess file that is in your root_dir) Third, adding to htaccess. 1. Open .htaccess file. 2. Add this line to the file (edit for your own page name Code: RewriteRule ^newpage /?option=newpage [NC] Note: You shouldnt have to, but if it doesnt work the first time, try clearing your cache files. Custom HTML/CSS/PHP http://theorderofindividualacceptance.co...p.php?id=1 |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
How to add a new page to your script - Punktured - 09-12-2011 12:43 PM
RE: How to add a new page to your script - mrkinkys - 17-02-2012, 08:44 PM
RE: How to add a new page to your script - Punktured - 18-02-2012, 12:37 PM
RE: How to add a new page to your script - mrkinkys - 21-02-2012, 12:23 AM
RE: How to add a new page to your script - Punktured - 22-02-2012, 03:05 PM
|