Allow the url to be specified as a function for more custom URL creation