PHPackages                             copiaincolla/metatags-bundle - 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. copiaincolla/metatags-bundle

ActiveSymfony-bundle[Utility &amp; Helpers](/categories/utility)

copiaincolla/metatags-bundle
============================

HTML Meta Tags management.

2.8(11y ago)52.4k4[7 issues](https://github.com/copiaincolla/MetaTagsBundle/issues)MITPHP

Since Jan 24Pushed 11y ago5 watchersCompare

[ Source](https://github.com/copiaincolla/MetaTagsBundle)[ Packagist](https://packagist.org/packages/copiaincolla/metatags-bundle)[ Docs](https://github.com/copiaincolla/MetaTagsBundle)[ RSS](/packages/copiaincolla-metatags-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (27)Used By (0)

MetaTagsBundle
==============

[](#metatagsbundle)

Symfony2 Bundle to manage html meta tags by path matching. This bundle manages relative paths, and not absolute urls.

How it works
============

[](#how-it-works)

You, as developer, specify the paths you want to be visible to admins in a reserved area of your website. Then an admin can manually set meta tags values for a concrete path, or define some regex rules to be applied to apths. You can also set some meta tags in yout twig templates.

MetaTagsBundle **loads** some urls and manages the association between an **url** and its **meta tags values** storing the data in the database.

To choose which urls must be managed by MetaTagsBundle, you must **load** the **routes** generating them. There are some different methods to achieve this:

- load all the routes of a bundle by including the bundle name in `config.yml`
- for each route, specify the option `ci_metatags_expose` in the Route annotation

For routes requiring parameters that must be fetched from database, there's the possibility to load entities from database, and associate the route parameters to the entities values in order to create urls.

For more specific needs, it is also possible to create a custom service which simply returns an array of urls.

Once the urls are loaded in MetaTagsBundle, you will be able to associate the following meta tags to each url:

- **title**
- **description**
- **keywords**
- **author**
- **language**
- **robots**
- **googlebot**
- **og:title**
- **og:description**
- **og:image**

It is possible to specify default values for each meta tag, used when a url has no or partially meta tags specified by the user.

**Note:** This bundle is in **beta** state at the moment, in test phase and almost ready for the first release.

---

Changelog
---------

[](#changelog)

10/04/2014 - Version 2.1

Compatibility with Symfony 2.4 has been added.

03/03/2014 - Version 2.0

The templates of the admin area have been refactored, reducing the number of files. Compatibility with Symfony 2.3 has been introduced. Functionality "allow\_edit\_url" has been suspended.

20/08/2013 - Version 1.1

The version 1.1 is shipped! The most important introduction is the possibility to define cascading regex rules for default meta tag values.

05/04/2013 - Version 1.0

In this date the version 1.0 is tagged, hurray! This means that this bundle is no more in beta release, but ready for production environments.

24/01/2013 - Version 0.1

THe work on this bundle begins, now in alpha state.

---

Install
-------

[](#install)

Installation instructions can be found in [Installation](Resources/doc/install.md).

The current version (master branch) of this bundle is compatible with Symfony &gt;= 2.2.\*

#### Tag notes

[](#tag-notes)

We will try to provide tags as best as we can, to be used proficiently with composer or deps.

The development of this bundle is intended for Symfony versions &gt;= 2.0.\*; here is a brief explanation of the tagging system we use:

- tags with the **"X.Y"** format are compatible with `Symfony >= 2.2.*`
- tags with the **"S2.0/X.Y"** format are compatible with `Symfony 2.0.*`
- tags with the **"S2.1/X.Y"** format are compatible with `Symfony 2.1.*`

If you are using symfony 2.0.\*, follow [this guide on the symfony-2.0.x branch](https://github.com/copiaincolla/MetaTagsBundle/blob/symfony-2.0.x/README.md).

If you are using symfony 2.1.\*, follow [this guide on the symfony-2.1.x branch](https://github.com/copiaincolla/MetaTagsBundle/blob/symfony-2.1.x/README.md).

More details about *tagging and branching system* used in CopiaincollaMetaTagsBundle can be found in [Tagging and Branching system explanation](Resources/doc/tagging_branching.md).

Configure
---------

[](#configure)

To configure this bundle, read [Configuration](Resources/doc/configuration.md) for all possible values.

The default meta tag values are configurable by web interface, at url `/metatags/defaults`.

Load urls
---------

[](#load-urls)

To generate urls starting by all routes contained in a bundle, just add the bundle name to `config.yml`, as explained [here](Resources/doc/configuration.md#copiaincolla_meta_tags--urls_loader--exposed_routes).

You can also add a single route by specifying an option in the Route annotation, like this:

```
@Route("/product/{id}/{slug}", name="product_show", options={"ci_metatags_expose"=true})

```

Through this option, you can also choose **not** to generate urls from a specific route:

```
@Route("/product/{id}/{slug}", name="product_show", options={"ci_metatags_expose"=false})

```

You can also generate urls for associating meta tags by fetching data from database; read the section [Configuration#dynamic\_routes](Resources/doc/configuration.md#copiaincolla_meta_tags--urls_loader--parameters--dynamic_routes).

Finally, you can also create your custom **urls loader** service, by following [this guide](Resources/doc/custom_urls_loader_service.md).

### Display help message to user

[](#display-help-message-to-user)

You can specify a @Route option to display a message in the edit page, just use the `ci_metatags_help` options:

```
@Route("/product/{id}/{slug}", name="product_show", options={"ci_metatags_help"="This urls represents a product. Use {{ entity.title }} to print the title of a product"})

```

Usage in the templates
----------------------

[](#usage-in-the-templates)

Currently only twig is supported.

In the template containing an `` tag, simply add:

```

        {% render controller('CopiaincollaMetaTagsBundle:MetaTags:render') %}
        [...]

    [...]

```

To overwrite the default meta tags and the custom meta tags inserted by web interface, you can specify the `inlineMetatags` variable:

```
{% render controller('CopiaincollaMetaTagsBundle:MetaTags:render', { 'inlineMetatags': {'title': 'New foo title'} }) %}

```

For a better explanation of usage in templates and advanced use, read [Template usage](Resources/doc/template_usage.md).

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity73

Established project with proven stability

 Bus Factor1

Top contributor holds 75.2% 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.

###  Release Activity

Cadence

Every ~22 days

Recently: every ~9 days

Total

23

Last Release

4379d ago

Major Versions

0.13 → 1.02013-04-05

1.1 → 2.02014-03-03

### Community

Maintainers

![](https://www.gravatar.com/avatar/3700504375cba8ef5b7ca848163f4838550617c356efbfd38f5ca2932b8a4c77?d=identicon)[inmarelibero](/maintainers/inmarelibero)

![](https://www.gravatar.com/avatar/f8f70077f1ee4d00e842123ad55781c70676b0256f54d79dea8d0369737e7639?d=identicon)[jury89](/maintainers/jury89)

---

Top Contributors

[![inmarelibero](https://avatars.githubusercontent.com/u/254808?v=4)](https://github.com/inmarelibero "inmarelibero (106 commits)")[![jury89](https://avatars.githubusercontent.com/u/741100?v=4)](https://github.com/jury89 "jury89 (35 commits)")

---

Tags

htmltagmetametatag

### Embed Badge

![Health badge](/badges/copiaincolla-metatags-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/copiaincolla-metatags-bundle/health.svg)](https://phpackages.com/packages/copiaincolla-metatags-bundle)
```

###  Alternatives

[sonata-project/classification-bundle

Symfony SonataClassificationBundle

913.2M20](/packages/sonata-project-classification-bundle)

PHPackages © 2026

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