Russ Lipton Documents Radio
simplex veri sigillum

How To Create Navigation Links

What are they, you ask?

Navigation links are those nifty links to the left (well, okay, sometimes to the right) of the pages of many weblogs. At the moment I am writing, mine looked like this:

Want some of your own?

1. Select 'Prefs' from the Radio Command Menu at the top of any of your local weblog pages.

2. Select 'Navigator Links' from the Weblog section of the Prefs page.

3. The navigator links page shown below displays some of my navigator links as well as the basic Userland instructions for defining them.

If you are the nervous type, turn upstreaming off so your experiments don't spill over to the world at large. You could also copy-paste and save the code inside your navigator links box to some ordinary Windows text file, just in case ....

3a. At first installation, Radio automatically created the 'Home' item and its link. At that point, the code in this window looked like this:

<navigator><item name="Home" pagename="/"/></navigator>

Each of your navigator links must honor the same structure as the 'item' line above: <item name="Home" pagename="/"/>

You will supply every item with a 'name' (the title that will appear on your weblog page; in this case 'Home') and a 'pagename' (the URL for the link; in this case '/' refers to the home page of our weblog).

An entire group of navigator links are bracketed by a <navigator> tag at the beginning of the group and </navigator> at the end. Notice the '/' character in the second, but not the first, tag. Computers are very picky.

The starting and ending 'navigator' tag only appear once each; however you may have many 'items' (that is, navigator links).

3b. Fill the 'name' and 'pagename' attributes of a new 'item' with your own content. Notice my first link:

<item name="About" pagename="/stories/2002/02/23/about.html"/>

First, I supplied "About" for the 'name' attribute.

Then, I pasted in the actual URL within the 'pagename' attribute for a story I wrote except the 'absolute' Internet address portion. If you had actually browsed to that document on my website, that URL would display like this in the browser 'Address' bar:

The URL I entered into the navigator links box is termed a relative URL: ="/stories/2002/02/23/about.html"/> - relative, that is, to the longer, absolute form.

Now, what is the point to all this?

Radio 'knows' how to connect up the internal location of your weblog posts or stories to your user number and public Internet site.

What is the benefit to this?

By entering relative URLs for your navigator links, Radio will keep the navigator links pointing to the correct public location if you should change that location at a later point. For instance, you might change to-of-from the FTP option or move your site from the Radio Community Server to another community server.

Of course, some navigator links will be truly external entirely to your own site. In the navigator box at the top of this topic, I include a link to Dave Winer's Scripting News. The pagename entry must contain the absolute URL to that site:

(A mechanical note: I copied-and-pasted the default item supplied by Userland and then entered my own texts in place of the 'Home' and '/'.  You don't have to copy-and-paste. I do that to reduce the possbility of making typing errors. While making navigator links is easy, the code must follow the needed structure exactly. For instance, don't forget to use beginning and ending double quotation marks; don't forget the opening and closing brackets, etc).

3c. Continue to create new links until done. Take a good look at my group of links. Each new link is exactly like the original 'Home' one except that I supplied a different 'name' and URL for the 'pagename'.

4. You may, but you do not have to modify the visual appearance of the links:

Don't worry about the 'div' label (hey, don't delete it though)! Heck, don't worry about any of the jargon above if you don't want to. Here is a simple key:

The 'align' centers the links. The links are sized 'small'. The <b> and </b> tags boldface the links.

For extra credit, can you spot the Radio macro on this line? (You say, huh?).

The Radio macro is <%item%>. Whenever Radio sees a tag with this double percentage sign (%), it substitutes something else for the tag label or otherwise performs some actions.

In this case, the macro substitutes the content and link value of the item you defined in step 3. above and then does that over-and-over again for each item you defined until it comes to the end of the group of links.

If you know some HTML (or go out and learn some), you can modify these tags to suit yourself. Or you can have a root canal. Your choice.

5. You can add separators (say, horizontal rules) between your items or otherwise arrange them relative to one another:

I use a simple line break <br> between my navigator links.

I highly recommend that you follow the 'Editing the Navigator Links' link shown above. (Of course, you can't do it here - this is just a screen capture.)

Notice the last line in the Userland help file:

This nod to the <%navigatorLinks%> macro reveals the secret as to why your links will show up on the left side of your weblog. I'm sorry, I can't pause to tell you exactly how to fiddle with templates here. You're on your own. We're dealing with navigator links this time around.

6. Click 'Submit' to lock-in the changes to your navigator links.

7. If you are satisfied with your work, turn upstreaming back on. If not, go back and take another shot. You must also run a simple Userland script to make sure that all of your existing posts and stories, not just your new ones, are 'touched' by your navigator link changes.

Are we having fun yet?

 <-- Return to Home Page

Copyright 2002 © Russ Lipton.
Last update: 4/9/02; 8:09:23 PM.
0 page reads.