PHPackages                             fromholdio/silverstripe-superlinker-targets - 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-superlinker-targets

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

fromholdio/silverstripe-superlinker-targets
===========================================

A SilverStripe module providing basic link/target data objects built using the Superlinker foundation

4.0.0(1w ago)0790BSD-3-ClausePHP

Since Aug 10Pushed 1w ago1 watchersCompare

[ Source](https://github.com/fromholdio/silverstripe-superlinker-targets)[ Packagist](https://packagist.org/packages/fromholdio/silverstripe-superlinker-targets)[ Docs](https://github.com/fromholdio/silverstripe-superlinker-targets)[ RSS](/packages/fromholdio-silverstripe-superlinker-targets/feed)WikiDiscussions master Synced yesterday

READMEChangelog (3)Dependencies (2)Versions (11)Used By (0)

SilverStripe SuperLinker Targets
================================

[](#silverstripe-superlinker-targets)

Basic link/target DataObjects built on SuperLinker foundation.

Overview
--------

[](#overview)

Provides a `Target` class that extends `SuperLink` for general-purpose link objects. Useful for:

- Related links
- Resource links
- Navigation links
- Any generic link collection

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

[](#requirements)

- SilverStripe Framework ^6.0
- fromholdio/silverstripe-superlinker ^4.0.0

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

[](#installation)

```
composer require fromholdio/silverstripe-superlinker-targets
```

Run dev/build:

```
vendor/bin/sake dev/build flush=1
```

Usage
-----

[](#usage)

### Basic Usage

[](#basic-usage)

```
use Fromholdio\SuperLinkerTargets\Model\Target;

class Page extends SiteTree
{
    private static $has_many = [
        'RelatedLinks' => Target::class
    ];
}
```

### CMS Fields

[](#cms-fields)

```
use Fromholdio\MiniGridField\MiniGridField;

public function getCMSFields(): FieldList
{
    $fields = parent::getCMSFields();

    $fields->addFieldToTab('Root.Links',
        MiniGridField::create('RelatedLinks', 'Related Links', $this)
            ->setLimit(10)
    );

    return $fields;
}
```

### Templates

[](#templates)

```

        Related Links

                    $Title

```

Usage Examples
--------------

[](#usage-examples)

### Example 1: Footer Links

[](#example-1-footer-links)

```
namespace App\Extensions;

use Fromholdio\SuperLinkerTargets\Model\Target;
use SilverStripe\Core\Extension;

class SiteConfigExtension extends Extension
{
    private static $has_many = [
        'FooterLinks' => Target::class
    ];
}
```

```
SilverStripe\SiteConfig\SiteConfig:
  extensions:
    - App\Extensions\SiteConfigExtension
```

**Template**:

```

            $Title

```

### Example 2: Resource Links

[](#example-2-resource-links)

```
class ResourcePage extends Page
{
    private static $has_many = [
        'ResourceLinks' => Target::class
    ];

    public function getValidResourceLinks(): ArrayList
    {
        return Target::excludeInvalidLinks($this->ResourceLinks());
    }
}
```

**Template**:

```

        Resources

                    $Title

                        $Description

```

### Example 3: Social Media Links

[](#example-3-social-media-links)

```
namespace App\Extensions;

use Fromholdio\SuperLinkerTargets\Model\Target;
use SilverStripe\Core\Extension;

class SiteConfigExtension extends Extension
{
    private static $has_many = [
        'SocialLinks' => Target::class
    ];
}
```

**With Icons**:

```
Fromholdio\SuperLinkerTargets\Model\Target:
  extensions:
    - Fromholdio\SuperLinker\Extensions\SuperLinkIconExtension
```

**Template**:

```

                $Title

```

### Example 4: Card Links with Images

[](#example-4-card-links-with-images)

```
Fromholdio\SuperLinkerTargets\Model\Target:
  extensions:
    - Fromholdio\SuperLinker\Extensions\SuperLinkImageExtension
    - Fromholdio\SuperLinker\Extensions\SuperLinkDescriptionExtension
```

```
class HomePage extends Page
{
    private static $has_many = [
        'FeatureCards' => Target::class
    ];
}
```

**Template**:

```

                $Title

                    $Description

```

Customization
-------------

[](#customization)

### Adding Custom Fields

[](#adding-custom-fields)

Extend the Target class:

```
namespace App\Extensions;

use SilverStripe\Forms\FieldList;
use SilverStripe\Forms\TextField;
use SilverStripe\Core\Extension;

class TargetExtension extends Extension
{
    private static $db = [
        'CustomField' => 'Varchar(255)'
    ];

    public function updateCMSFields(FieldList $fields): void
    {
        $fields->addFieldToTab('Root.Main',
            TextField::create('CustomField', 'Custom Field')
        );
    }
}
```

```
Fromholdio\SuperLinkerTargets\Model\Target:
  extensions:
    - App\Extensions\TargetExtension
```

### Creating Subclasses

[](#creating-subclasses)

For specific use cases, create subclasses:

```
namespace App\Model;

use Fromholdio\SuperLinkerTargets\Model\Target;

class SocialLink extends Target
{
    private static $table_name = 'App_SocialLink';

    private static $singular_name = 'Social Link';
    private static $plural_name = 'Social Links';

    private static $allowed_types = [
        'external'
    ];
}
```

Alternative for New Projects
----------------------------

[](#alternative-for-new-projects)

Instead of using this module, create your own link classes:

```
namespace App\Model;

use Fromholdio\SuperLinker\Model\SuperLink;

class Link extends SuperLink
{
    private static $table_name = 'App_Link';

    private static $singular_name = 'Link';
    private static $plural_name = 'Links';
}
```

This gives you full control without an extra dependency.

Documentation
-------------

[](#documentation)

For complete SuperLinker documentation, see:

- [SuperLinker README](../silverstripe-superlinker/README.md)
- [SuperLinker Technical Guide](../silverstripe-superlinker/augment.md)

License
-------

[](#license)

BSD-3-Clause

Support
-------

[](#support)

- **GitHub**:
- **Issues**:

###  Health Score

50

—

FairBetter than 96% of packages

Maintenance98

Actively maintained with recent releases

Popularity16

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~307 days

Recently: every ~268 days

Total

9

Last Release

11d ago

Major Versions

1.0.1 → 2.0.02019-08-21

2.x-dev → 3.0.02024-01-07

3.x-dev → 4.0.02026-05-02

### 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 (14 commits)")

---

Tags

linksilverstripebuttonCTAsuperlinker

### Embed Badge

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

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

###  Alternatives

[sheadawson/silverstripe-linkable

A couple of handy form fields and objects for managing external and internal links on DataObjects

39316.2k24](/packages/sheadawson-silverstripe-linkable)[unisolutions/silverstripe-copybutton

Adds copy button to the GridField.

1736.4k](/packages/unisolutions-silverstripe-copybutton)[burnbright/silverstripe-externalurlfield

Provides SilverStripe with a DBField and FormField for handling external URLs.

109.6k1](/packages/burnbright-silverstripe-externalurlfield)

PHPackages © 2026

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