Gathan Beaga

Thanks Jake!

Thanks to Jake (again) the tracking script has been fixed so that it loads itself into the homepage, and the homepage only. Here’s what he said:

Ok — you can do something like this: In your #homeTemplate.txt, add something like this:

<% local (pta = html.getPageTableAddress ()); if pta^.radioResponder.fileBeingRendered == (user.radio.prefs.wwwFolder + "index.txt") {return (file.readWholeFile ("path_to_your_JavaScript_file"))} else {return ("")} %>

Note — you’ll want to remove all of the line-endings that my email app undoubtedly added to the above, otherwise you’ll get a macro error in your page. Also (obviously), replace path_to_your_JavaScript_file with the full path to the text file that contains the JavaScript you want to add.

There are more sophisticated ways to do this kind of thing, and if you want details, let me know. But for a one-off implementation, the above will work well enough.

I feel a bit guilty that I’ve managed to have yet another solution written for me… but anyway, thanks Jake.

Mark Paschal also contributed to my understanding in this area. Thanks Mark. Radio users are generally pretty helpful to one another, it seems.