2015-12-19 21:24:52 +01:00
|
|
|
title: url_to
|
|
|
|
---
|
2016-02-11 01:13:37 +01:00
|
|
|
summary: Calculates the URL to a specific page relative to the current.
|
2015-12-19 21:24:52 +01:00
|
|
|
---
|
|
|
|
type: function
|
|
|
|
---
|
|
|
|
module: lektor.context
|
|
|
|
---
|
|
|
|
signature: path, alt=None, absolute=None, external=None
|
|
|
|
---
|
|
|
|
body:
|
|
|
|
|
|
|
|
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
|
|
|
|
:ref](../../db/obj/url-to/) on source objects.
|