add generateUrl and docs for generating urls in controller and templates