I would prefer to see the url calculated in the controller alongside the other view data preparation code.