PHPackages                             fromholdio/silverstripe-relativeurlfield - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. fromholdio/silverstripe-relativeurlfield

ActiveSilverstripe-vendormodule[Utility &amp; Helpers](/categories/utility)

fromholdio/silverstripe-relativeurlfield
========================================

2.0.0(7mo ago)043511BSD-3-ClausePHP

Since Jun 10Pushed 7mo ago2 watchersCompare

[ Source](https://github.com/fromholdio/silverstripe-relativeurlfield)[ Packagist](https://packagist.org/packages/fromholdio/silverstripe-relativeurlfield)[ Docs](https://github.com/fromholdio/silverstripe-relativeurlfield)[ RSS](/packages/fromholdio-silverstripe-relativeurlfield/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)Dependencies (1)Versions (8)Used By (1)

silverstripe-relativeurlfield
=============================

[](#silverstripe-relativeurlfield)

Upgraded for Silverstripe v6.x. See tags/branch 1.x for SS v5.x compatibility.

Similar to SiteTreeURLSegmentField except:

- No `SiteTree` dependency - use anywhere
- Set a `BaseURL` (or `Director::absoluteBaseURL` as fallback)
- User can enter a URL slug - or a full URL path (toggled via field setting)
- User can include query string or not (toggled via field setting)
- Based on URL slug (or full path), collision checks are performed, and `-n` counter added to value
- By default, using BaseURL and supplied URL slug/path, collision with pages in site tree is checked
- Base URL is always displayed to user, including when entering relative url path, so that the user sees the context and understands which part of the url they should be entering

### Straight-forward to use:

[](#straight-forward-to-use)

```
$field = RelativeURLField::create('FieldName', 'Field Title');

// available toggles/settings
$field->setBaseURL();                           // The base URL that the user-entered value is relative to. Defaults to Director::absoluteBaseURL().
$field->setBaseURLBySiteTree();                 // Pass a SiteTree object here, to use it's AbsoluteLink as the BaseURL (useful for Multisites for example, pass the Site object).
$field->setIsQueryStringAllowed();              // Can user include a query string? (will be stripped if not)
$field->setisFullPathAllowed();                 // Can user enter a path with multiple slugs? (else their value will have '/'s removed)
$field->setHelpText();                          // Special chars text

// manage collision checks
$field->addCollisionCheck($key, ?$callable);   // pass a string Key and either implement check via $callable, or use Key via extension hook
$field->removeCollisionCheck($key);            // remove by Key. 'sitetree' is enabled by default.
```

### Couple of screenshots to give the gist

[](#couple-of-screenshots-to-give-the-gist)

[![](./docs/en/images/sshot01.png)](./docs/en/images/sshot01.png)

[![](./docs/en/images/sshot02.png)](./docs/en/images/sshot02.png)

[![](./docs/en/images/sshot03.png)](./docs/en/images/sshot03.png)

[![](./docs/en/images/sshot04.png)](./docs/en/images/sshot04.png)

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance62

Regular maintenance activity

Popularity17

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 53.3% of commits — single point of failure

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 ~166 days

Recently: every ~125 days

Total

6

Last Release

235d ago

Major Versions

1.x-dev → 2.0.02025-09-19

### Community

Maintainers

![](https://www.gravatar.com/avatar/40e135ad117686bee39707c1d9286cc5e915e219c26a10d13858ca44d14f1eb0?d=identicon)[dizzystuff](/maintainers/dizzystuff)

---

Top Contributors

[![dizzystuff](https://avatars.githubusercontent.com/u/576903?v=4)](https://github.com/dizzystuff "dizzystuff (8 commits)")[![xini](https://avatars.githubusercontent.com/u/1152403?v=4)](https://github.com/xini "xini (7 commits)")

---

Tags

silverstripe

### Embed Badge

![Health badge](/badges/fromholdio-silverstripe-relativeurlfield/health.svg)

```
[![Health](https://phpackages.com/badges/fromholdio-silverstripe-relativeurlfield/health.svg)](https://phpackages.com/packages/fromholdio-silverstripe-relativeurlfield)
```

PHPackages © 2026

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