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.2(1mo ago)29282[1 PRs](https://github.com/arillo/silverstripe-metatags/pulls)MITPHPPHP ^8.3

Since Feb 24Pushed 1mo 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 yesterday

READMEChangelogDependencies (5)Versions (18)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)

CMS versionBranch / versionSilverStripe CMS ^6`master` (3.x-dev) — you are hereSilverStripe CMS ^4 || ^5[`2.x`](https://github.com/arillo/silverstripe-metatags/tree/2.x)SilverStripe CMS ^3[`1.x`](https://github.com/arillo/silverstripe-metatags/tree/1.x)PHP ^8.3 required for the SS6 master line.

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:

```
