[Router] added appending of new optional document fragment

added a new optional parameter to the generate method for the document
fragment. when specified this is appended to generated urls.