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

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

fromholdio/silverstripe-dbhtmlanchors
=====================================

Quick and easy method of identifying anchors in DBHTMLText and DBHTMLVarchar fields

2.1.0(9mo ago)21.3k↓83.3%1BSD-3-ClausePHP

Since Feb 17Pushed 9mo ago1 watchersCompare

[ Source](https://github.com/fromholdio/silverstripe-dhtmlanchors)[ Packagist](https://packagist.org/packages/fromholdio/silverstripe-dbhtmlanchors)[ Docs](https://github.com/fromholdio/silverstripe-dhtmlanchors)[ RSS](/packages/fromholdio-silverstripe-dbhtmlanchors/feed)WikiDiscussions master Synced 2w ago

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

silverstripe-dbhtmlanchors
==========================

[](#silverstripe-dbhtmlanchors)

Quick and easy method of identifying anchors in DBHTMLText and DBHTMLVarchar fields.

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

[](#requirements)

SilverStripe 4

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

[](#installation)

`composer require fromholdio/silverstripe-dbhtmlanchors`

Detail
------

[](#detail)

Upon install, the `DBHTMLAnchorsExtension` is automatically applied to `DBHTMLText` and `DBHTMLVarchar`.

This adds a `getAnchors()` accessor to each of these DBFields.

When called on the field object, it processes any shortcodes, and then searches the html elements for `name` and `id` attributes that can be used as anchor link targets.

The list of anchor values is returned as a simple array.

Usage example
-------------

[](#usage-example)

Add a `DBHTMLText` or `DBHTMLVarchar` to your data object. The `Content` field of `SiteTree` is a common example of one that already exists.

```
private static $db = [
    'Content' => 'HTMLText'
];
```

In your code, get the field object, and call `getAnchors()`. Make sure you get the field object, not the field's value.

```
// CORRECT
$contentField = $this->dbObject('Content');
$anchors = $contentField->getAnchors();

// WRONG
$contentField = $this->Content;
$anchors = $contentField->getAnchors();
```

The value returned will be either `null` for no results, or an associative array, with key and value both containing the anchor value.

```
// return value from ->getAnchors()
[
    'sectionone' => 'sectionone',
    'sectiontwo' => 'sectiontwo'
]
```

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance57

Moderate activity, may be stable

Popularity20

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity64

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

Total

4

Last Release

284d ago

Major Versions

1.1.0 → 2.0.02024-07-22

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

---

Tags

HTML5silverstripedbfielddbhtmltext

### Embed Badge

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

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

###  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.1M83](/packages/silverstripe-userforms)[symbiote/silverstripe-gridfieldextensions

A collection of useful grid field components

951.9M264](/packages/symbiote-silverstripe-gridfieldextensions)[silverstripe/tagfield

Tag field for SilverStripe

561.3M50](/packages/silverstripe-tagfield)[jonom/silverstripe-betternavigator

Front-end utility menu for Silverstripe websites featuring administration and development tools

59429.0k12](/packages/jonom-silverstripe-betternavigator)[symbiote/silverstripe-advancedworkflow

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

46299.9k9](/packages/symbiote-silverstripe-advancedworkflow)[lekoala/silverstripe-cms-actions

Add actions to your models in SilverStripe

39317.0k29](/packages/lekoala-silverstripe-cms-actions)

PHPackages © 2026

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