You have a couple of options here. Setting a hash url is basically the same as calling can.route.attr with removeOthers set to true. The destructive way of doing this would be to simply have hard links to the each option and call it a day. Otherwise, you can either setup a helper function or listen to the event and update can.route within you callback accordingly.
With the first option, something along the lines of:
- can.Mustache.registerHelper('url', function(field, data) {
return can.route.url({ field : data.attr(field) });
});
- {{link 'foo' bar}}