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(11mo ago)049211BSD-3-ClausePHP

Since Jun 10Pushed 3mo 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 2w 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

39

—

LowBetter than 84% of packages

Maintenance68

Regular maintenance activity

Popularity16

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity50

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

334d 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)
```

###  Alternatives

[silverstripe/userforms

UserForms enables CMS users to create dynamic forms via a drag and drop interface and without getting involved in any PHP code

1321.1M94](/packages/silverstripe-userforms)[symbiote/silverstripe-advancedworkflow

Adds configurable workflow support to the CMS, with a GUI for creating custom workflow definitions.

46304.8k9](/packages/symbiote-silverstripe-advancedworkflow)[silverstripe/sharedraftcontent

Share draft page content with non-CMS users

19427.6k13](/packages/silverstripe-sharedraftcontent)[axllent/silverstripe-cms-tweaks

Several CMS usability improvements

1726.6k1](/packages/axllent-silverstripe-cms-tweaks)[nzta/silverstripe-sitebanner

Site-wide banners activated through the CMS

1039.7k](/packages/nzta-silverstripe-sitebanner)[dorsetdigital/silverstripe-enhanced-requirements

Enhanced requirements for Silverstripe

128.6k4](/packages/dorsetdigital-silverstripe-enhanced-requirements)

PHPackages © 2026

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