As a continuation of web usability, comes the topic of URHere indicators. They help give the user a sense of where they are and where they can go. Without these, It can become unclear where they are in your site and they may just hit the close button
This is exactly why URHere indicators are important, but those of you that use them know that they can become a pain to manually do on each page.
There is a solution. Using PHP you can limit the hassle caused by this convention. First you would need a PHP array that contains information about each of your links:
$pages = array('Home'=>'index.php','Results'=>'results.php');
Now you place a variable on each page such as:
$URHere = 'Home;
And then loop through each page in your array and check if the above variable matches the ‘Home’ part in the array. If it does then you assign a class of URHere and format that class using CSS, if it is anything else you create a link using the array with the text of ‘Home’ and link of ‘index.php’.
Using includes you can now change a link on your page, and it will affect all pages and all places it was used. Talk about a friendly way to do navigation.
Twitter
Follow me on Twitter to keep up to date!
RSS Feed
Keep up with all of our updates by subscribing to our RSS feed!
FaceBook
Join our group on Facebook and become a fan of us!