UserLand Forum : Radio Userland's Discussion Forum, for technical questions and maybe answers.
Updated: 4/7/2005; 2:23:49 AM.

 

Subscribe to "UserLand Forum" in Radio UserLand.

Click to see the XML version of this web page.

Click here to send an email to the editor of this weblog.

 
 

Sunday, January 30, 2005

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    comment []

© Copyright 2005 Ross Calloway.



Click here to visit the Radio UserLand website.
 


January 2005
Sun Mon Tue Wed Thu Fri Sat
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31          
Dec   Mar