theres the url() function in the templates that can be used for this, id prefer that. Simply pass the route to the template.