Could we pull out the link-building code for iSites here and for Canvas later into helper methods? I'm guessing that we'll need to build URLs more than just here, and this seems like a particularly easy place to introduce bugs.