A script to generate a blogroll for each category. This is for users who have discovered Radio's outliner and wish to create blogrolls or link rolls by rendering OPML files with Radio's blogroll macro, rather than using the navigatorLinks.xml files that Radio provides for in the browser interface. When inserted into #hometemplate.txt, this script automates the display of customized blogrolls for each category, while using a single template throughout your site for your homepage and all categories. The OPML-based method of generating blogrolls has significant advantages, including easier editing and more control over styles via CSS.
<%if not defined (categoryName) <<{return ""} else {local (catName = categoryName, adrBlog = radio.weblog.init(), categoryLinks = "http://127.0.0.1:5335/gems/"); local (catFileName = adrBlog^.categories.[catName].fileName); categoryLinks = (categoryLinks + catFileName + ".opml"); radio.macros.blogroll (categoryLinks, flProcessMacros:"true", flXmlButton:"false")}%>
NOTE - remove the '<<' from in front of 'return' above - I had to add it because otherwise that part of the script would not display in this discussion group post.
I hope some fellow Radioheads may find this useful. I have tested this and it works fine on my blog, but if anybody encounters problems or has questions please let me know. I am not a programmer so there may be more elegant alternatives.
More details posted on my weblog here.
David [Radio UserLand Messages]
3:14:06 PM
|