Also generates links when route_name is None. It's the case when we have custom javascript events on them.
Also generate the navigation data when the routes are None. Also support forcing the relpath (it's usefull when we want to display a path which is not the current from the request)