This page is no longer updated

We've left it here for reference. Find Out More.

PlanetHITOP

Basic Hitop.

5. Navigation, Navigation, Navigation

The three most important things about a web page are Navigation, Navigation, Navigation. You can have as much great content as you want, but if people can't find it easily, then they'll leave and go elsewhere.

If you have a website that is only a few pages, then you probably won't think much about navigation, but as that website grows, and grows, it becomes more and more important.

Navigation can be done in many forms, but should always be simple to understand and consistent. Thankfully Hitop makes creating navigation easy, thanks to the @NAV command.

Let's suppose we have a web site about radio stations. We have five pages, each about a different radio station - BBC Radio One, BBC Radio 5 Live, BBC GLR and xfm. We also have a main index page, which we'll call Contents.

Using Hitop, we can place a consistent Navigation bar on our page. By using @NAV in our template file, we can place a consistent navigation bar in the same place on each page.

We can pass our information through to @NAV directly, using the following:

<@NAV DATA="Contents=#,BBC Radio One=#,BBC Radio 5 Live=radio5live.html,BBC GLR=bbcglr=html,xfm=xfm.html">
Hitoplive
Don't forget if you're using Hitoplive, to change the .html extension to .live

This would create the following:

· Contents
· BBC Radio One
· BBC Radio 5 Live
· BBC GLR
· xfm

This in itself is nice. However if we were on one of the pages included in the nav bar, you'd notice something even nicer - the entry for the page you are on, will not be a link. Click an entry in the nav bar above to see for yourself.

Types of Navigation

Hitop offers three different types of navigation - FLAT, FOLDED and OPEN. When no type is specified, @NAV reverts to FOLDED. The chosen type specified by passing @NAV a FORMAT parameter as follows:

<@NAV DATA="Contents=contents.html,BBC Radio One=radio1.html,BBC Radio 5 Live=radio5live.html,BBC GLR=bbcglr=html,xfm=xfm.html" FORMAT="FOLDED">

Let's see what the three types look like. FLAT looks like this:

Contents | BBC Radio One | BBC Radio 5 Live | BBC GLR | xfm

FOLDED looks like this:

· Contents
· BBC Radio One
· BBC Radio 5 Live
· BBC GLR
· xfm

And finally OPEN looks like this:

· Contents
· BBC Radio One
· BBC Radio 5 Live
· BBC GLR
· xfm

Now you may be thinking that there's not much difference between the OPEN and FOLDED. Well not right now there isn't - we'll find out more about the differences in Part 6.

You may also be thinking that the way @NAV makes things look isn't really that exciting. While functional, it's not that attractive. While @NAV provides us with three default styles, it is also very customisable, enabling you to make it's output look anyway you want. We'll learn more about this feature, later on.

You can download sample source and template files to experiment with in this zip file.


<back | top^ | next>

Planet Bods NetworkSites in the network