PHPackages                             nyeholt/silverstripe-advertisements - 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. nyeholt/silverstripe-advertisements

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

nyeholt/silverstripe-advertisements
===================================

A simple mechanism for implementing tracked advertisements

122616PHP

Since Feb 16Pushed 9y ago1 watchersCompare

[ Source](https://github.com/nyeholt/silverstripe-advertisements)[ Packagist](https://packagist.org/packages/nyeholt/silverstripe-advertisements)[ RSS](/packages/nyeholt-silverstripe-advertisements/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependenciesVersions (2)Used By (0)

SilverStripe Advertisement Management module
============================================

[](#silverstripe-advertisement-management-module)

A simple module to manage advertisements on pages.

Maintainer Contact
------------------

[](#maintainer-contact)

Marcus Nyeholt

&lt;marcus (at) silverstripe (dot) com (dot) au&gt;

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

[](#requirements)

SilverStripe 3.1.x

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

[](#documentation)

Add

```
Page:
  extensions:
    - AdvertisementExtension
SiteConfig:
  extensions:
    - AdvertisementExtension

```

to your project's configuration yml file.

Note that ads are inherited hierarchically, so setting ads on the Site Config will mean those ads are used across all pages unless specified for a content tree otherwise.

- Navigate to the "Ads" section
- Create some Advertisements
- If you want to group the ads in a collection, create an Ad Campaign. These in turn can be associated with a client.
- On the Advertisements tab of a page (or Site Config), you can select the individual ads (or campaign) to be displayed.
- In your page template, use the AdList collection to actually list out the Ads to be displayed. Use the "Me" or "SetRatioSize" helpers to output an image linked as needed for proper click tracking.

    &lt;% loop SiteConfig.AdList %&gt;

     $Me $SetRatioSize(120,80)

     &lt;% end\_loop %&gt;
- You can have complete control over how things are output by referring to the ad's Image and Link accessors. Be aware that if you're going to manually output the link, to include a special attribute used if tracking ad views (eg Advertisement::$use\_js\_tracking = true). So, output something like

```

```

- Reference an ad directly from a template via

```
$findAd(Title)

```

Check the Advertisement class for more.

TODO
----

[](#todo)

Add extension method and include for doing a rotating ad banner across all pages. You can do these manually for now via Page\_Controller if you want. Just select all Ads and iterate the collection

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 85.7% 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/25cb1c56a7ab949d1e6b28a2a04862ce1cffe1799a291e1797f8dfd33cd83716?d=identicon)[nyeholt](/maintainers/nyeholt)

---

Top Contributors

[![nyeholt](https://avatars.githubusercontent.com/u/161730?v=4)](https://github.com/nyeholt "nyeholt (12 commits)")[![simonexmachina](https://avatars.githubusercontent.com/u/261804?v=4)](https://github.com/simonexmachina "simonexmachina (1 commits)")[![spekulatius](https://avatars.githubusercontent.com/u/8433587?v=4)](https://github.com/spekulatius "spekulatius (1 commits)")

### Embed Badge

![Health badge](/badges/nyeholt-silverstripe-advertisements/health.svg)

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

###  Alternatives

[luminous/luminous

A full featured syntax highlighting library.

501.8k2](/packages/luminous-luminous)

PHPackages © 2026

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