PHPackages                             gorriecoe/silverstripe-htmltag - 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. [Templating &amp; Views](/categories/templating)
4. /
5. gorriecoe/silverstripe-htmltag

ActiveSilverstripe-vendormodule[Templating &amp; Views](/categories/templating)

gorriecoe/silverstripe-htmltag
==============================

Provides a simply method for wrapping strings with html tags.

1.1.2(8y ago)111.7k9[1 PRs](https://github.com/gorriecoe/silverstripe-htmltag/pulls)2BSD-3-ClausePHP

Since Mar 2Pushed 3y ago1 watchersCompare

[ Source](https://github.com/gorriecoe/silverstripe-htmltag)[ Packagist](https://packagist.org/packages/gorriecoe/silverstripe-htmltag)[ Docs](http://github.com/gorriecoe/silverstripe-htmltag)[ RSS](/packages/gorriecoe-silverstripe-htmltag/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (4)Dependencies (1)Versions (5)Used By (2)

Silverstripe html tag
=====================

[](#silverstripe-html-tag)

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

[](#installation)

Composer is the recommended way of installing SilverStripe modules.

```
composer require gorriecoe/silverstripe-htmltag

```

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

[](#requirements)

- silverstripe/framework ^4.0

Maintainers
-----------

[](#maintainers)

- [Gorrie Coe](https://github.com/gorriecoe)

Template usage
--------------

[](#template-usage)

```
{$h1($Title).setClass('title').setPrefix($Class)}

```

Is the equivalent of

```

        {$Title}

```

And returns

```

    This sections title

```

Controller/Object usage
-----------------------

[](#controllerobject-usage)

```
use gorriecoe\HTMLTag\View\HTMLTag;

class MyController extends Controller
{
    public function Title()
    {
        $title = HTMLTag::create($this->Data()->Title, 'h1')
            ->setPrefix($this->Class);
        if (true) {
            $title->setClass('title')
        }
        return $title;
    }
}
```

Accessing and modifying the output in the template

```

    {$Title.addClass('anotherclass')}

```

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity66

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

Total

4

Last Release

2958d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/11811440?v=4)[Gorrie Coe](/maintainers/gorriecoe)[@gorriecoe](https://github.com/gorriecoe)

---

Top Contributors

[![gorriecoe](https://avatars.githubusercontent.com/u/11811440?v=4)](https://github.com/gorriecoe "gorriecoe (5 commits)")

---

Tags

htmlsilverstripetemplatesmarkup

### Embed Badge

![Health badge](/badges/gorriecoe-silverstripe-htmltag/health.svg)

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

###  Alternatives

[laminas/laminas-view

Fast and type safe HTML templating library with a flexible plugin system supporting multistep template composition

7526.3M230](/packages/laminas-laminas-view)[silverstripe-themes/simple

The SilverStripe simple theme (default SilverStripe 3 theme)

411.3M8](/packages/silverstripe-themes-simple)[symbiote/silverstripe-usertemplates

Provides user-definable templates within the CMS that can be applied to content trees. Allows specification of Layout and main templates, as well as associating css + js files

1414.5k1](/packages/symbiote-silverstripe-usertemplates)[daycry/twig

twig for Codeigniter 4

145.1k2](/packages/daycry-twig)

PHPackages © 2026

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