Make a smarty function that can be used in the template to get a good link