ezurl

Summary

Returns a working version of an eZ Publish URL (provided as input).

Usage

input|ezurl( [ quote [, type ] ] )

Parameters

NameTypeDescriptionRequired
quote string Quote style: "no", "single" or "double" (default). No.
type string URL type: "full" or "relative" (default). No.

Returns

A quoted string containing a valid / working version of the input URL.

Description

This operator takes an eZ Publish URL as input (either a uri access method, the following URLs will be produced:

"http://www.example.com/index.php/my_company/content/view/full/1024"
"http://www.example.com/index.php/my_company/test"

Example 2

<a href={'/content/view/full/1024'|ezurl()}>Test</a>
<a href={'/test'|ezurl()}>Test</a>

If eZ Publish is running in a virtual host environment and uses the host access method, the following type of URLs will be produced:

"/content/view/full/1024"
"/test"

The "index.php" part of the URL will be supressed by the virtual host configuration. The name of the siteaccess will not appear in the URL because eZ Publish will use the domain/host to figure out which siteaccess to use.

If eZ Publish is running in a non-virtual host environment and uses the uri access method, the following URLs will be produced:

"/index.php/my_company/content/view/full/1024"
"/index.php/my_company/test"

This document is based on eZ Publish Documentation. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License.