So as I just mentioned, I'm making some changes to system macros. I'm not positive, but my hunch is that the next time I update my Radio.root file I'm going to lose these changes huh? What's that common practice to avoid losing one's changes? The only solution I can think of is to copy the entire macro to my own root file (aka guest database) and call those routines from my templates instead. It doesn't seem that bad, but I'm just wondering if there's a better way.
So I'm setting up my blogroll, as you can see on the right (hopefully). I noticed the rendering was a little... well, how should I put this, poopy. :) That's ok though, that's kinda the power of Radio. You're supposed to pretty things up yourself, including the system macros. So I traced the rendering down to the html.data.standardMacros.opmlToBlogRoll macro, opened it up, disected it and ulitmately made it do what I wanted it to do. Essentially I wanted it to indent each sublevel that it was rendering, so I started by augmenting the signature of the addItem routine, like so:
<codeSnippet language="UserTalk">
on addItem(text, url, xmlurl, indentLevel=0, indentPixelAmount=10)
</codeSnippet>
Next I added a local to addItem which calculates the actual pixels based on depth:
<codeSnippet language="UserTalk">
local(indexPixels = (indentPixelAmount * indentLevel))
</codeSnippet>
Then I found where the <div>s were being rendered and added an extra style to each one, for example:
<codeSnippet language="UserTalk">
add("<div class=\"" + cssPrefix + "Text" style="margin-left:" +
indexPixels + "px;\">" + xmllinks + text + "</div>")
</codeSnippet>
Finally, I just made sure to pass the indent level to addItem where it was being called in renderOneLevel:
<codeSnippet language="UserTalk">
addItem(text, url, xmlurl, indentLevel)
</codeSnippet>
Simple really and the interesting part is Userland was already calculating the indentlevel in their renderOneLevel routine, but they were only using it to indent the HTML source not the actual HTML content itself.