Workbench: Displaying Category Links in Radio UserLand


Workbench: Programming and publishing news and comment

Programming and publishing news and comment

 

Workbench.root

Workbench.viewCategories()

This script displays a list of links to each of a weblog's categories that is being rendered as HTML. Other categories are ignored.

To use the script on a Web page or a template such as #homeTemplate.txt, at the spot where the category links should appear, add this macro:

<%Workbench.viewCategories()%>

Here's the output of that macro for my weblog:

Jargon
Java
Microsoft Bob
OPML Link Publisher
Radio Userland
Salon Blogs
Sports
XP Networking

The macro displays each category link separated by BR tags. It can be called with three parameters, in this order:

  1. class, the name of the CSS class for each hyperlink (default: no class)
  2. preText, the HTML and/or text to display before each hyperlink (default: none)
  3. postText, the HTML and/or text to display after each hyperlink (default: <BR>)

An example:

<%Workbench.viewCategories("sidebarlink", "<li>", "<br>")%>

Output of that macro for my weblog:

  • Jargon
  • Java
  • Microsoft Bob
  • OPML Link Publisher
  • Radio Userland
  • Salon Blogs
  • Sports
  • XP Networking

    Home

    comments

  • Copyright 2004 Rogers Cadenhead. Last updated 3/19/2004; 4:18:47 PM.