I don't think you should hard-code front-end specific stuff in the model. Is it possible to build this URL in the template? Maybe just do it for now just to save time.