PHPackages                             clyons-eis/silverstripe-metadataobject - 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. clyons-eis/silverstripe-metadataobject

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

clyons-eis/silverstripe-metadataobject
======================================

Provide basic MetaData for custom DataObjects; declare default functions &amp; override as needed

03611[3 PRs](https://github.com/clyonsEIS/silverstripe-MetaDataObject/pulls)PHP

Since Apr 7Pushed 10y ago1 watchersCompare

[ Source](https://github.com/clyonsEIS/silverstripe-MetaDataObject)[ Packagist](https://packagist.org/packages/clyons-eis/silverstripe-metadataobject)[ RSS](/packages/clyons-eis-silverstripe-metadataobject/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

silverstripe-MetaDataObject
===========================

[](#silverstripe-metadataobject)

\##Requirements

- Silverstripe 3.1+

\##Installation

- Install to silverstripe root
- `dev/build?flush=1`

\##Introduction MetaDataObject allows you to apply basic MetaData to any DataObject including MetaTitle, MetaDescription, og:title, og:description, and og:image. Default functions can be optionally declared to supply dynamic fallback data. CMS interfaces for each of the fields are also provided in a 'Meta' tab, allowing overrides. The field data is always preferred if set.

\##Usage Apply the extension to your custom DataObject class.

```
CustomDataObject:
  extensions:
    - 'MetaDataObject'
```

Optional - provide fallback methods for each of the available meta properties on each decorated custom DataObject:

```
	public function getDefaultMetaTitle()
	{
		return ...;
	}
	public function getDefaultOGTitle()
	{
		return ...;
	}
	public function getDefaultMetaDescription()
	{
		return ...;
	}
	public function getDefaultOGDescription()
	{
		return ...;
	}
	public function getDefaultOGImage()
	{
		return ...;
	}
```

In your controller action, retrieve the meta data by calling DataObjectMeta on the desired object of the custom class:

```
	public function view() {
		$item = $this->getItem();
        ...
		$meta = $item->DataObjectMeta();
		return array_merge(
			$meta,
			array(
               'OtherData' => $OtherData
			)
		);
	}
```

Your template should be set up to display the fields individually, rather than the SS/Simple merged MetaTags per this example. Fallbacks for the title &amp; og:title tags are recommended.

```
    $MetaTitle$Title - $SiteConfig.Title

```

\##About The goal of this module is to be light weight and flexible for use in a variety of controller routing situations. Controller action integration is intentionally not included. For a more fully-featured module to handle viewing DataObjects as pages, see

\##Contributing Pull requests &amp; issues are welcome to make this module more flexible &amp; powerful.

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/503ebd2c49c66404db13872d30d6435a0be3655921331adee7e1cbe2efdc45e3?d=identicon)[clyonsEIS](/maintainers/clyonsEIS)

---

Top Contributors

[![clyonsEIS](https://avatars.githubusercontent.com/u/4998937?v=4)](https://github.com/clyonsEIS "clyonsEIS (6 commits)")

### Embed Badge

![Health badge](/badges/clyons-eis-silverstripe-metadataobject/health.svg)

```
[![Health](https://phpackages.com/badges/clyons-eis-silverstripe-metadataobject/health.svg)](https://phpackages.com/packages/clyons-eis-silverstripe-metadataobject)
```

PHPackages © 2026

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