PHPackages                             arillo/silverstripe-metatags - 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. arillo/silverstripe-metatags

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

arillo/silverstripe-metatags
============================

Metatags for SilverStripe

3.0.1(3mo ago)2874↓100%2[1 issues](https://github.com/arillo/silverstripe-metatags/issues)[1 PRs](https://github.com/arillo/silverstripe-metatags/pulls)MITPHP

Since Feb 24Pushed 3mo ago6 watchersCompare

[ Source](https://github.com/arillo/silverstripe-metatags)[ Packagist](https://packagist.org/packages/arillo/silverstripe-metatags)[ Docs](https://github.com/arillo/silverstripe-metatags)[ RSS](/packages/arillo-silverstripe-metatags/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (2)Versions (16)Used By (0)

Arillo\\MetaTags
================

[](#arillometatags)

[![Latest Stable Version](https://camo.githubusercontent.com/ce2777b1b7a182740d29b1d261e961cece98d2dad6d417217c1cd46d32a027f2/68747470733a2f2f706f7365722e707567782e6f72672f6172696c6c6f2f73696c7665727374726970652d6d657461746167732f762f737461626c653f666f726d61743d666c6174)](https://packagist.org/packages/arillo/silverstripe-metatags) [![Total Downloads](https://camo.githubusercontent.com/1805952b0cd9ea68908543070a61b5a8bf0cfd99f3d051d6a6e6935bf9e9b21d/68747470733a2f2f706f7365722e707567782e6f72672f6172696c6c6f2f73696c7665727374726970652d6d657461746167732f646f776e6c6f6164733f666f726d61743d666c6174)](https://packagist.org/packages/arillo/silverstripe-metatags)

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](http://ogp.me/) and [Twitter](https://dev.twitter.com/cards/getting-started) meta tags based on pages `$MetaDescription`.

### Requirements

[](#requirements)

SilverStripe CMS ^4.0

For a SilverStripe 3.x compatible version of this module, please see the [1 branch, or 0.x release line](https://github.com/arillo/silverstripe-metatags/tree/1.x).

Usage
-----

[](#usage)

Install with composer:

```
composer require arillo/silverstripe-metatags
```

or clone the repo:

```
git clone git@github.com:arillo/silverstripe-metatags.git
```

Configure the extension:

```
Arillo\MetaTags\MetaTagsExtension:
  titles_by_pagetype:
    Default: $MetaTitle$Title / $SiteConfig.Title # Define the default  tag pattern. (Defaults to $Title)
    HomePage: $MetaTitle$Title                    # Exception for the HomePage page-type
    ProductsPage: $Item.Title           # Pattern for a DataObject
```

Include the template in your ``:

```

  $MetaTagsX

```

Be sure **not** to include `$MetaTags` in your ``, the module includes it in the default template. To customize the rendering of the metatags copy the template `MetaTagsX.ss` to your project theme.

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

### Recommended

[](#recommended)

Move the `MetaDescription` field inside the Meta Tab:

```
