Monday, November 08, 2010 at 12:05 AM.

on helpUrl (helpTopic, pagename="help") {
		<<1/9/02; 5:01:33 PM by JES
			<<Crash fix. The crash occurred when rendering Help pages, which have links to related Prefs pages, and the Prefs outline hasn't been compiled since Radio was launched. Call radio.prefs.compileIfDirty instead of radio.prefs.browseHelp.
			<<Hard-wired for English right now.
		<<12/15/01; 5:23:27 AM by JES
			<<New optional parameter, pagename. Specify prefs or help, to get the URL for a prefs page or a help page.
		<<12/12/01; 9:53:51 PM by JES
			<<When calling radio.prefs.browseHelp to generate the help page cache, set pta^.uri to the uri for the help page, and then set it back again. This fixes the problem where all the links on the help page were wrong.
		<<11/23/01; 9:30:22 PM by DW
			<<Use the 7.1 help system.
	local (adroutlines =;
	local (url, adrcache);
	on findit () {
		if not defined ( {
			return (false)};
		for adrcache in {
			if nameof (adrcache^) endswith pagename {
				if defined (adrcache^.pagetitles.[helptopic]) {
					return (true)}}};
		return (false)};
	if not findit () {
		local (pta);
		<<local (thisUri)
		<<try //flip the uri in the pagetable to the help uri so that the links will be correct on the cached help page
			<<pta = html.getPageTableAddress ()
			<<thisUri = pta^.uri
			<<pta^.uri =
		<<radio.prefs.browseHelp () //load the cache
		radio.prefs.compileIfDirty (@adroutlines^.[pagename]);
		<<if pta != nil //reset pta^.uri
			<<pta^.uri = thisUri
		findit ()};
	try {
		url =[pagename] + "?page=" + adrcache^.pagetitles.[helptopic]}
	else {
		url = "brokenLink"};
	return (url)}

This listing is for code that runs in the OPML Editor environment. I created these listings because I wanted the search engines to index it, so that when I want to look up something in my codebase I don't have to use the much slower search functionality in my object database. Dave Winer.