I still don't know how many episodes this mini series will consist of, but today I'm focusing on the liveTopicsSeeAlso macro, which displays a list of related topics with each post.
If you look at the bottom of this post, as rendered on
s l a m's
home page, you'll notice the small type:
See also: liveTopics macros
Clicking on
liveTopics or
macros takes you to the topics index for
s l a m, with an expanded entry for the topic you've just clicked on (takes a while these days, we're expecting transclusion to come to the rescue :-).
That is because the #itemTemplate.txt template file, responsible for the layout of each individual post, includes a line like this:
<%liveTopicsSeeAlso ( postnum:<%itemNum%>, htmlEnclosure:"span" ) %>
The first parameter,
postnum, is actually a call to a standard Radio global variable, that returns the current post's identification number.
The second parameter, htmlEnclosure, specifies that I want my topics listed in a line which includes other elements - a permalink and a comments link. I achieve this result by enclosing the output of the macro in a 'span' HTML tag.
By default, liveTopicsSeeAlso encases its output in a 'div' HTML tag, which breaks the current line by creating a box-like effect around the topics list.
This is fine if you want your topics to stand out on their own, as demonstrated by multimedia mogul and html connoisseur Marc Canter in the top right corner of his posts.
I see that Marc knowingly uses another parameter, flDisplayInColumn, setting it to true to ensure that his topics are laid out in a stack, whereas the default false value displays topics in a space separated list, as on s l a m.
liveTopicsSeeAlso provides a bunch of other optional parameters.
- seeAlsoTag specifies the text to be used as a prefix to the list of displayed topics. The default value is of course 'see also'. You can provide an empty string (""), as Marc does, to prevent the display of any prefix.
- statusTag specifies the text to be used in the browser's status bar when the mouse hovers over a topic link. the text defaults to 'See more posts about: [the_designated_topic]'.
- htmlClass, htmlId and hrefClass provide the same services as their namesakes in liveTopicsHotButtons.
That's it for now. Next time, I'll probably play with liveTopicsGoogleJazz.