Comments? Email me: tar@durge.org |
NAV! NAV! I love NAV!You lucky, lucky people.This session we are going to look at something which on it's own would make hitop superb. I cannot state how much I like this feature. It makes my life worth living. Which is a bit sad really... But anyway, enough about me. You want to know about NAV! What does NAV do?See that menu of links to the left? That's NAV, that is. (Oh OK, if you're using lynx, they may be up top, but you know what I mean...) NAV will create a link menu incredibly easily. "So what?", I hear you cry. "Any template could do that." Ah, but you're missing the clever bit - you'll notice this page (Session 3) isn't a link, because hitop knew you don't want to link to the page you are on... Try clicking on the Cows link. Come back! You'll notice that a submenu appears for Cows when you get to that page, and the sub menu for Hitop disappears. Clever, eh? This is NAV in the default style, called FOLDED. We'll create a NAV for our last page, hellofixed.html, and for one new page. Our first NAV...We need to open up our template.hitop file again. This is where the NAV lives - it makes sense, as it effects every page. So, open it up. It doesn't look like much at the moment:
We need to add the info about the pages we want in the NAV. As we want it
to appear on the page, we need to put the NAV tag in-between the BODY tags.
We'll put it before the MAINTITLE. So, in-between
Now save the file (use the same name - template.hitop). So, what did that mean? Well, the @NAV tells hitop we want to put a NAV at that point in the page. The DATA="..." part does what it says - it tells hitop what the names and addresses of your pages are. You have to put the pages in the format shown - Name=address. The list is seperated by commas, as you can see. As you've probably noticed, we don't have a navtutorial.html file. That's what we're going to make now. We need to make a new hitop source file, called (you guessed it) navtutorial.hitop and put the relevant info in it. We'll try something like this:
This should be fairly familiar to you - there's nothing new in this file, just changed the content in some tags. Save this file as navtutorial.hitop and now we'll put them together. We now have two source files (navtutorial.hitop and hellofixed.hitop) and one template file (template.hitop). We want to make the two pages, so type this at a command prompt:
Then:
You know have two pages linked by a working NAV! Isn't it amazing? Well, I admit it's not that amazing yet, you could have done that fairly easily by hand. But can you imagine if you had, say, 10 pages, how long it would take? 100? With NAV, you only need to input the data once. Now that you have an idea of how NAV works, we can begin looking at some of the more interesting parts of it. We'll do that next session. |