PHPackages                             se7enxweb/ezurlmultisite - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. se7enxweb/ezurlmultisite

ActiveEzpublish-legacy-extension

se7enxweb/ezurlmultisite
========================

Exponential kernel override extension featuring template operator php class overrides that replace at runtime the template operators like ezurl and ezroot to bind content trees to siteaccess host names for true multisite content object resolution to url routes. Great for all large content websites and website networks. Great for smart developers!

v1.1.0(yesterday)13↑2900%GPL-2.0-or-laterPHP &gt;=5.0.0

Since Jul 19Compare

[ Source](https://github.com/se7enxweb/ezurlmultisite)[ Packagist](https://packagist.org/packages/se7enxweb/ezurlmultisite)[ Docs](https://github.com/se7enxweb/ezurlmultisite)[ Fund](https://account.venmo.com/u/se7enxweb)[ Fund](https://cash.app/$7xweb)[ RSS](/packages/se7enxweb-ezurlmultisite/feed)WikiDiscussions Synced today

READMEChangelog (3)Dependencies (1)Versions (4)Used By (0)

ezurlmultisite
==============

[](#ezurlmultisite)

Kernel class override for Exponential / Exponential Platform Legacy that extends the built-in `ezurl` template operator with multi-siteaccess link handling and a number of optional `sitelink`-inspired features, while keeping the original `ezurl` API intact.

What it does
------------

[](#what-it-does)

In a multi-site installation `ezurl` normally only prepends the index path and quotes the input. It does not know that a relative URL such as `websites/sole-kracker-org/foo` or `slashnews` might belong to a different siteaccess and must be rendered as an absolute URL on the correct host.

This extension overrides `eZURLOperator` so `ezurl` can, without template changes:

1. Detect a different target siteaccess from a `PathPrefix` match.
2. Fall back to resolving the content node from the URL alias to determine the target siteaccess.
3. Build the correct `http(s):///` output when linking across siteaccesses.
4. Leave local/internal links unchanged.
5. Accept an optional third `parameters` hash with extra options such as `absolute`, `siteaccess`, `hash`, `query`, `no_self_link`, `protocol`, etc.

It also registers three new operators for advanced use:

- `ezurl_path`
- `ezurl_siteaccess`
- `ezurl_roots`

Requirements
------------

[](#requirements)

- eZ Publish 4.x / eZ Platform Legacy 2017+
- `eZURLOperator` kernel class override support enabled
- `EZP_AUTOLOAD_ALLOW_KERNEL_OVERRIDE` enabled in `config.php` for the kernel override layer

Installation
------------

[](#installation)

1. Copy or clone this extension to `extension/ezurlmultisite`.
2. Add the extension to `settings/override/site.ini.append.php`:

```
[ExtensionSettings]
ActiveExtensions[]=ezurlmultisite
```

3. Regenerate autoload arrays:

```
php bin/php/ezpgenerateautoloads.php --extension
php bin/php/ezpgenerateautoloads.php --kernel-override
```

4. Clear caches:

```
php bin/php/ezcache.php --allow-root-user --clear-tag=ini
php bin/php/ezcache.php --allow-root-user --clear-tag=template
```

File layout
-----------

[](#file-layout)

```
extension/ezurlmultisite/
├── autoloads/
│   └── eztemplateautoload.php
├── classes/
│   ├── ezurlmultisite.php
│   ├── ezurlmultisiteoperator.php
│   ├── ezurlmultisitedatatypehandler.php
│   ├── ezurlmultisiteurlhandler.php
│   ├── ezurlmultisitebinaryfilehandler.php
│   ├── ezurlmultisiteobjectrelationhandler.php
│   └── kerneloverride/
│       └── v2025.01.15/
│           └── kernel/
│               └── common/
│                   └── ezurloperator.php
├── settings/
│   └── ezurlmultisite.ini
└── README.md

```

- `classes/kerneloverride/.../ezurloperator.php` is the kernel override for `kernel/common/ezurloperator.php`.
- `classes/ezurlmultisite.php` contains the shared helper logic.
- `classes/ezurlmultisiteoperator.php` registers `ezurl_path`, `ezurl_siteaccess` and `ezurl_roots`.

Basic usage
-----------

[](#basic-usage)

Templates continue to use `|ezurl` as before:

```
...
```

No template changes are required for the multi-siteaccess fix.

Extended `ezurl` parameters
---------------------------

[](#extended-ezurl-parameters)

The operator keeps the original positional parameters:

```
{$url|ezurl}
{$url|ezurl('single')}
{$url|ezurl('no','full')}
```

A third positional parameter, `parameters`, accepts a hash of advanced options:

```
{$url|ezurl('double','relative',hash('absolute',true(),'protocol','https'))}
```

### Available parameters

[](#available-parameters)

KeyTypeDescription`absolute`booleanForce a full absolute URL.`siteaccess`stringForce the target siteaccess.`protocol`stringOverride the URL scheme: `http`, `https`, `//` (protocol-relative), or empty for current scheme.`hash`stringAppend a URL fragment (`#section`).`query`string or hashAppend a query string; a hash is converted to `key=value&...`.`user_parameters`arrayAppend eZ Publish view user parameters as `/(key)/value` segments.`no_self_link`booleanReturn an empty string if the link target is the current page.`node_id`booleanWhen the input is an integer, treat it as a node ID (`true`, default) or object ID (`false`).`link_type`stringFor class-based links, request a specific type such as `internal`, `external` or `download`.### Examples

[](#examples)

```
{* Force absolute URL *}
...

{* Force a specific siteaccess *}
...

{* HTTPS absolute link, with query and fragment *}
...

{* Pass an integer node ID *}
...

{* Pass an object ID instead *}
...
```

### Protocol / HTTPS

[](#protocol--https)

The current request scheme is used by default, so an HTTPS page generates `https://` absolute URLs. The `protocol` option can override this:

```
{* Protocol-relative URL *}
...

{* Force plain HTTP *}
...
```

New operators
-------------

[](#new-operators)

### `ezurl_path`

[](#ezurl_path)

Returns the path part of the resolved link, with the target siteaccess prefix stripped.

```
{def $path = $node.url_alias|ezurl_path()}
```

### `ezurl_siteaccess`

[](#ezurl_siteaccess)

Returns the name of the siteaccess that should host the given input.

```
{def $sa = $node.url_alias|ezurl_siteaccess()}
```

### `ezurl_roots`

[](#ezurl_roots)

Returns an array of root node information per siteaccess. Each element contains `siteaccess`, `host`, `prefix` and `root_node_id`.

```
{def $roots = ezurl_roots()}
```

Configuration
-------------

[](#configuration)

Settings are in `extension/ezurlmultisite/settings/ezurlmultisite.ini`. Copy the file to `settings/override/ezurlmultisite.ini.append.php` to customize it safely.

### `[OperatorSettings]`

[](#operatorsettings)

```
[OperatorSettings]
ForceAbsoluteURL=disabled
DefaultLinkType=internal
DefaultQuote=double
DefaultServerURL=relative
RoleOverride=disabled
SiteLinkClassList[]
```

- `ForceAbsoluteURL=enabled` makes every `ezurl` call absolute by default.
- `SiteLinkClassList[]` lists class identifiers that should use class-based link generation (see below).

### `[HostMap]`

[](#hostmap)

Override the host used for a siteaccess when `site.ini` `SiteURL` is not enough:

```
[HostMap]
SiteAccess[korg_sole]=sole.example.com
```

### `[RoleMap]`

[](#rolemap)

Force the target siteaccess for users with a given role. Enable with `RoleOverride=enabled` in `[OperatorSettings]`.

```
[RoleMap]
RoleList[12]=korg_edit
```

### `[ClassSettings]` and per-class blocks

[](#classsettings-and-per-class-blocks)

```
[ClassSettings]
DefaultLinkType=internal
SelfLinking=enabled

[link]
DefaultLinkType=external
LinkTypeList[internal]=internal_link
LinkTypeList[external]=external_link
LinkTypeList[download]=file
DataTypeClass=eZURLMultisiteURLHandler
```

For classes listed in `SiteLinkClassList[]`, `ezurl` can resolve the link from a specific attribute. `LinkTypeList` maps a link type to an attribute identifier, and `DataTypeClass` can override the datatype handler used for the attribute.

### `[PathSettings]`

[](#pathsettings)

```
[PathSettings]
DisableNodeID=disabled
DisableObjectID=disabled
NodeIDList[]
ObjectIDList[]
```

When `DisableNodeID` or `DisableObjectID` is `enabled`, listed IDs cause `ezurl`to return an empty string.

### `[DataTypeSettings]`

[](#datatypesettings)

```
[DataTypeSettings]
HandlerList[ezurl]=eZURLMultisiteURLHandler
HandlerList[ezstring]=eZURLMultisiteURLHandler
HandlerList[ezbinaryfile]=eZURLMultisiteBinaryFileHandler
HandlerList[ezobjectrelation]=eZURLMultisiteObjectRelationHandler
```

Custom handlers must implement `eZURLMultisiteDataTypeHandler`.

Datatype handlers
-----------------

[](#datatype-handlers)

The extension ships with three handlers:

- `eZURLMultisiteURLHandler` for `ezurl` and `ezstring` attributes.
- `eZURLMultisiteBinaryFileHandler` for `ezbinaryfile` attributes, with `download` link type support.
- `eZURLMultisiteObjectRelationHandler` for `ezobjectrelation` attributes, resolving the related object's main node URL alias.

License
-------

[](#license)

Copyright (C) 1998 - 2026 7x

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance100

Actively maintained with recent releases

Popularity6

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity30

Early-stage or recently created project

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

3

Last Release

1d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1083669?v=4)[7x](/maintainers/7x)[@7x](https://github.com/7x)

---

Tags

phpextensionoverrideez publisheZ Publish LegacyeZ Publish Platformezurl-compatiblekernel override class

### Embed Badge

![Health badge](/badges/se7enxweb-ezurlmultisite/health.svg)

```
[![Health](https://phpackages.com/badges/se7enxweb-ezurlmultisite/health.svg)](https://phpackages.com/packages/se7enxweb-ezurlmultisite)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
