This documentation is for a version that has reached its End Of Life. Such versions are no longer supported and don't receive security updates. Consider updating to a newer version.
URL Twig functions¶
ez_path()
returns the relative URL to a Content item or Location.ez_url()
returns the absolute URL to a Content item or Location.ez_urlalias()
generates URLs for a Location from the given arguments.ez_route()
generates a RouteReference object from the given parameters.ibexa_oauth2_connect_path()
generates a relative path for the given OAuth2 route.ibexa_oauth2_connect_url()
generates an absolute URL for the given OAuth2 route.
URLs¶
ez_path()
¶
ez_path()
returns the relative URL to a Content item or Location.
Argument | Type | Description |
---|---|---|
name |
string eZ\Publish\API\Repository\Values\Content\Location eZ\Publish\API\Repository\Values\Content\Content eZ\Publish\API\Repository\Values\Content\ContentInfo eZ\Publish\API\Repository\Values\Content\Location eZ\Publish\Core\MVC\Symfony\Routing\RouteReference |
The name of the route, Location or Content. |
parameters |
array |
Route parameters. |
relative |
boolean |
Whether to generate a relative path. |
1 |
|
ez_url()
¶
ez_url()
returns the absolute URL to a Content item or Location.
Argument | Type | Description |
---|---|---|
name |
string eZ\Publish\API\Repository\Values\Content\Location eZ\Publish\API\Repository\Values\Content\Content eZ\Publish\API\Repository\Values\Content\ContentInfo eZ\Publish\API\Repository\Values\Content\Location eZ\Publish\Core\MVC\Symfony\Routing\RouteReference |
The name of the route, Location or Content. |
parameters |
array |
Route parameters. |
schemeRelative |
boolean |
Whether to generate a relative URL. |
1 |
|
ez_urlalias()
¶
ez_urlalias()
generates URLs for a Location from the given parameters.
Note
ez_urlalias
is a not a Twig function, but a special route name.
For more information about the use of ez_urlalias
as a parameter of the Symfony path
Twig function, see Links to other locations.
ez_route()
¶
ez_route()
generates a RouteReference object from the given parameters.
Argument | Type | Description |
---|---|---|
resource |
string eZ\Publish\API\Repository\Values\Content\Location eZ\Publish\API\Repository\Values\Content\Content eZ\Publish\API\Repository\Values\Content\ContentInfo eZ\Publish\API\Repository\Values\Content\Location eZ\Publish\Core\MVC\Symfony\Routing\RouteReference |
Resource or route name. |
params |
array |
Route parameters. |
1 |
|
OAuth2¶
ibexa_oauth2_connect_path()
¶
ibexa_oauth2_connect_path()
generates a relative path for the given OAuth2 route.
Argument | Type | Description |
---|---|---|
identifier |
string | Identifier of the OAuth connection. |
parameters |
array |
Route parameters. |
relative |
boolean |
Whether to generate a relative path. |
ibexa_oauth2_connect_url()
¶
ibexa_oauth2_connect_url()
generates an absolute URL for the given OAuth2 route.
Argument | Type | Description |
---|---|---|
identifier |
string | Identifier of the OAuth connection. |
parameters |
array |
Route parameters. |
schemeRelative |
boolean |
Whether to generate a relative URL. |