URHere Indicators

 

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.

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Add to favorites
  • Design Float
  • DZone
  • email
  • FriendFeed
  • PDF
  • Propeller
  • Reddit
  • RSS
  • StumbleUpon
  • Twitter

Related posts:

  1. PHP Arrays Unleashed
  2. Implementing paging using PHP and jQuery
  3. Usability: A forgotten aspect of Web Design?
  4. Client-Side Javascript


Written by Brenley Dueck

 

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

 
connect with me!