[JD] Generate pagination links via helper method

This branch adds a convenience method that creates pagination links.