Tuesday, July 29, 2008

Solving the navigation problem

Here are a few tips I picked up after redesigning one of my sites.

1.Some websites s you can see the main navigation options are listed in two lines (both at the top of the page and repeated at the bottom). But as the site has expanded there are more pages I wanted to add, and having more lines would begin to look untidy.

The solution ?

A vertical navigation bar.

This gives me scope to add more menu options easily but also, very important, I can group the options into categories.

2. I had a choice of putting the navigation bar on the left or the right. I chose right, one advantage being that the main text of each page (as opposed to the navigation bar text) is now nearer the top of the page which helps the rankings in the search engines.

3. I've long wanted to use SSI (Server Side Includes) for my navigation bar. This means that you just have one copy of the bar and any change takes effect in all the pages.

In order to 'include' an element such as a navigation bar in a page you need to give the page an extension of .shtml

The problem has been that for an existing site you don't want to rename pages which may be ranking well in the search engines.

The solution ?

I found an option on my server to process .htm or .html files as if they are .shtml files.

Note that there is one disadvantage of using SSI - you cannot view files locally as they would be seen online, the include instruction does not work.

However it's less of a problem for me than having to duplicate the bar in every single page.

No comments: