Metatags for SilverStripe

Installs: 747

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 8

Forks: 2

Open Issues: 2


2.1.1 2021-06-23 09:36 UTC

This package is auto-updated.

Last update: 2024-06-19 21:18:47 UTC



Latest Stable Version   Total Downloads

Better metatags for your SilverStripe Projects.

The module will add a $MetaImage to each page and a fallback $MetaImage to the $SiteConfig that will be used if no image is defined on a particular page (to avoid this behavior do not fill in the $SiteConfig.MetaImage in the CMS). It will automatically generate OpenGraph and Twitter meta tags based on pages $MetaDescription.


SilverStripe CMS ^4.0

For a SilverStripe 3.x compatible version of this module, please see the 1 branch, or 0.x release line.


Install with composer:

composer require arillo/silverstripe-metatags

or clone the repo:

git clone

Configure the extension:

    Default: <% if $MetaTitle %>$MetaTitle<% else %>$Title<% end_if %> / $SiteConfig.Title # Define the default <title> tag pattern. (Defaults to $Title)
    HomePage: <% if $MetaTitle %>$MetaTitle<% else %>$Title<% end_if %>                    # Exception for the HomePage page-type
    ProductsPage: $Item.Title           # Pattern for a DataObject

Include the template in your <head>:


Be sure not to include $MetaTags in your <head>, the module includes it in the default template. To customize the rendering of the metatags copy the template to your project theme.

Why the X? Because $MetaTags was taken by the SilverStripe default metatags =).


Move the MetaDescription field inside the Meta Tab:

use Arillo\MetaTags\MetaTagsExtension;
class Page extends SiteTree
    public function getCMSFields() {
        // move meta fields
        return MetaTagsExtension::prepare_cms_fields(parent::getCMSFields());