Is there a way to dynamically generate a link using the link-to helper by passing a variable with the route path?
For example, instead of hard coding the path like t
Is there a way to dynamically generate a link using the linkTo helper by passing a variable with the route path?
Not at the moment.
The use case for this is to allow me to consolidate templates which only differ by this path. For instance, if there are two collections each with a different destination.
Agreed this is a valid use case, I would expect linkTo helper to support it in future. Meantime since you've only got two collections you could accomplish this with conditionals in the template
{{#if isRouteOne}}
{{#linkTo "routeOne.subrouteOne" model}}{{model.title}}{{/linkTo}}
{{else}}
{{#linkTo "routeTwo.subrouteTwo" model}}{{model.title}}{{/linkTo}}
{{/if}}