overiding the prototype to make options.type have a local variable in the route template