Added support for using path-to-regexp in template.