- Adding Titles and Links to Entries
- Categorizing a Weblog
- Adding and Removing Links
- Summary
Adding and Removing Links
Radio takes care of most of the navigational links required on a weblog; links to the home page and the archive page created for each day's entries are created automatically.
On sites that use the default theme or another built-in theme, a calendar linking to daily archive pages is displayed.
Links to stories, categories, and other pages can be set up with the navigator links feature.
Navigator links can be used for site navigation and a blogroll, a list of links to weblogs and other sites that you frequent.
A weblog's navigator links are stored in a file called #navigatorLinks.xml in Radio's www folder.
Listing 3.1 contains an example of this file.
Listing 3.1 The Full Text of #navigatorLinks.txt.
1: <navigator> 2: <item name="Home" pagename="/"/> 3: <item name="Stories" pagename="/stories"/> 4: <item name=" "/> 5: <item name="Favorites"/> 6: <item name="Blog. Bonanza" pagename="http://radio.weblogs.com/0111413/"/> 7: <item name="FuzzyBlog" pagename="http://radio.weblogs.com/0103807/"/> 8: <item name="Jim Flowers" pagename="http://radio.weblogs.com/0113212/"/> 9: <item name="Second P0st" pagename="http://blogs.salon.com/0000002/"/> 10: <item name="Sticky String" pagename="http://radio.weblogs.com/0101433/"/> 11: <item name=" "/> 12: <item name="Reference"/> 13: <item name="Frontier" pagename="http://frontier.userland.com/"/> 14: <item name="Radio Userland" pagename="http://radio.userland.com/"/> 15: <item name="Weblogs.Com" pagename="http://www.weblogs.com"/> 16: <item name="<br>"/> 17: </navigator>
You can edit this file directly with any text editor or use the Navigator links preference page on the desktop Web site (click Prefs, look in the Weblog section, and then click Navigator links).
This file is formatted like an XML dialect (although it isn't officially XMLit lacks an ?xml processing instruction as the first line).
Even if you don't know anything about XML, the format is pretty simple.
The navigator links file must have a single root element named navigator that contains one or more item elements representing each link.
Each item element has a name attribute that contains text and an optional pagename attribute that contains the URL that should be linked to the text.
Items can be of three types:
-
Relative links to local pages on the same site as the weblog:
<item name="Stories" pagename="/stories"/>
-
External links to Web pages:
<item name="Blog. Bonanza" pagename="http://radio.weblogs.com/0111413/"/>
-
Unlinked text, such as blank links, headings, and entity-encoded HTML:
<item name=" "/> <item name="Reference"/> <item name="<br>"/>
Each weblog category can use the navigator links of the main weblog or offer its own. To create links for a category, follow these steps:
Open Radio's \www\categories folder.
Open the category's folder.
Create a new #navigatorLinks.xml file there.
If there is no #navigatorLinks.xml file in a folder, Radio finds and uses the one in the main \www folder.
This occurs because the software employs an inheritance system for preferences and settings based on the hierarchy of file folders within the main Radio folder.
If a specific folder does not contain a configuration file, Radio climbs up the hierarchy of folders looking for that file. When it finds one, that file is used.
For example, if you have a \www\categories\politics folder, here's where Radio looks for the navigator links file when entries are published to that category:
www\categories\politics
www\categories
www
Radio quits when it finds the file. If all else fails, there should be a #navigatorLinks.xml file in Radio's www folder, because that's where the main weblog's navigator links are defined.