lektor.context.url_to (path, alt=None, absolute=None, external=None)

Calculates the URL from the current source object on the context to the given other source object. Alternatively a path can also be provided instead of a source object. If the path starts with a leading bang (!) then no resolving is performed. If no alt is provided the alt of the page is used.

This works exactly the same as the method with the same name on source objects.