| toolbox | services | architecture | finance | payments | identity | xml | klogs | perl | fun | books |

daily link  Wednesday, August 07, 2002

Jon Udell is moving his weblog to new home using Radio and external FTP site. One of the gotchas he found:

"- If you hardcode your site address anywhere, you'll get burned. I did this in a few places. For example, I had:

instead of:


Right. In fact, I use my own macro to do just that and little bit more. <%ifLocal()%> macro, which looks like this:

on ifLocal (url1="/", url2=radio.macros.weblogUrl()) {
  if radioResponder.flSameMachine {return (url1)} else {return (url2)}

One of the problems with Radio that I noticed is that it's not easy to produce link that works properly off- and on-line. Local links look like this:, and external links look like this: I use external stylesheets and often work offline, so it's real problem for me. ifLocal macros always generates proper link and works for images, files and pretty much everything else. Just put this as a value for href or src attribute: <%ifLocal()%>gems/toolbox.css and you're done.
permalink Posted to klogs @ 12:39:22 AM ( comments)

Copyright (C) 2002 Paul Kulchenko Click here to send an email to the editor of this weblog. Updated 8/26/2002; 9:17:12 AM