add getPath method to template