Ads

Navigation, the 3nd 'different' way

Ever wondered how some sites have nice snazzy links like index.php?sect=home
Here i will show you how to accomplish this step by step.

Note: This only works with templates that expand with content. View my html iframe tutorial for fixed templates.

What it does
The script is a very simple template/ navigation system, That allows the template index.php to be separate from the content. so when you edit you're template you have 1 page to edit not the whole site. sounds good right ?

Invalid YouTube url.

I can guess you don't have a clue what the script means or how it works, right ? thats ok all u need to know is how to use it.

Ok what you do is.
1.Insert the code in the content area of you're template and save as index.php
2.Make a folder in the same directory as you're template called pages
3. Make a page with you're content on it and save as home.php in the pages folder
4. To view the page index.php with the content add ?sect=home at the end of it

I bet you're wondering how we add another page of content like a contact page.

1. Type out the contact content on to a blank page (like home.php) and save it in the pages folder as contact.php
2. To view this page simply change the home at the end of the link to contact like so index.php?sect=contact

Do this for all you're pages and there you have it a nice url and great way of keeping you're content separate from you're template.
Here is a .rar file containing one of my templates with the script set up,

Download the example given below:
php_nav_example.rar

Tut By: TazGfx

Sunday May 27, 2007 - 136 reads