PHPackages                             orgasmicnightmare/cakephp-seo - 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. orgasmicnightmare/cakephp-seo

ActiveCakephp-plugin

orgasmicnightmare/cakephp-seo
=============================

Seo plugin for CakePHP 3

5111↓100%2[2 issues](https://github.com/orgasmicnightmare/cakephp-seo/issues)PHP

Since Apr 19Pushed 5y ago2 watchersCompare

[ Source](https://github.com/orgasmicnightmare/cakephp-seo)[ Packagist](https://packagist.org/packages/orgasmicnightmare/cakephp-seo)[ RSS](/packages/orgasmicnightmare-cakephp-seo/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

CakePHP SEO Plugin
==================

[](#cakephp-seo-plugin)

[![License](https://camo.githubusercontent.com/a4f123cd26bcbd78e79cf366b67186676492cb9fad100a730baa74b9dbf1a19b/68747470733a2f2f706f7365722e707567782e6f72672f6f726761736d69636e696768746d6172652f63616b657068702d73656f2f6c6963656e7365)](https://packagist.org/packages/orgasmicnightmare/cakephp-seo)

A SEO plugin for cakePHP 3 to manage seo tags with ease. It comes with a Behavior, a Component, a View Cell and the default admin crud actions for each tables.

- The behavior helps you to generate some default tags for each model. You can use simple text, pattern, callbacks.
- The component inject tags in the view.
- The view cell helps you to add or edit tags directly in the admin view of a record.

*Note: This plugin has been inspired by [CakePHP-Seo-Plugin](https://github.com/webtechnick/CakePHP-Seo-Plugin)*

Installation
------------

[](#installation)

You can install this plugin into your CakePHP application using [composer](http://getcomposer.org).

The recommended way to install composer packages is:

```
composer require orgasmicnightmare/cakephp-seo

```

Then update your database to create the new tables

```
bin/cake migrations migrate -p Seo

```

You can now access to the admin sections :

- yoursite/admin/seo/seo-uris
- yoursite/admin/seo/seo-titles
- yoursite/admin/seo/seo-meta-tags
- yoursite/admin/seo/seo-canonicals

Behavior
--------

[](#behavior)

The SeoBehavior allows you to automatize the creation of seo fields when you add a new entry.

Configure the behavior, see below default configuration, and each time you will add an entry, all configured tags will be generated. It's a real time saver…

Later you can access to the data throw the admin sections or via the *Seo cell box* if in you add it in your model view.

default configuration is :

```
$_defaultConfig = [
    'urls' => [
        [
            'url' => [
                'prefix' => false,
                'action' => 'view',
                '_' => [
                    'slug' => 'slug'
                ]
            ],
            'title' => 'Seo default title',
            'canonical' => true,
            'meta_tags' => [
                'og:type' => [
                    'content' => 'website',
                    'is_property' => true
                ],
                'og:description' => [
                    'content' => '{{content}}',
                    'is_property' => true
                ],
                'og:locale' => [
                    'callback' => 'getLocale',
                    'is_property' => true
                ],
                'twitter:description' => [
                    'content' => '{{content}}',
                    'is_property' => true
                ],
            ]
        ]
    ]
];

```

- **urls** an array of urls you want to add tags
- **urls.url** standard CakePHP route options array. This key has two specials keys:
    - **\_** used to pass some variable for the route ex : /brand/:slug
    - **\_callback** a callback to generate a route options array
- **urls.title** Title pattern. Ex: `{{name}}`, will just use the field 'name' to fill the title tag.
- **urls.canonical** true if you want to add a canonical tag
- **urls.meta\_tags** array of meta tags you want to add. Each key is a new tag name and support many options
    - **callback** a callback wich is executed to set the content of the tag (more on this later)
    - **content** a template to format the content. Ex : `Hello {{name}}` the text in the double accolade is a field of the entity.
    - **is\_property** if true, the tag use the attribute "property" instead of "name".
    - **is\_http\_equiv** if true, the tag will have the attribute "is\_http\_equiv" set to true.

Component
---------

[](#component)

The SeoComponent prepare and send informations to the view based on the URI.
To use it, just add it in your `AppController.php` or any child controllers.

default configuration is :

```
$_defaultConfig = [
    'excludePrefix' => ['admin'],
    'defaults' => [
        'title' => 'Default Title',
        'prefix' => null,
        'suffix' => null
    ],
    'templates' => [
        'meta' => '',
        'canonical' => ''
    ]
];

```

- excludePrefix: bypass the process for theses prefixes
- defaults.title: the title tag
- defaults.prefix: prefix for the title tag
- defaults.suffix: suffix for the title tag

View Cell
---------

[](#view-cell)

You have access to all your seo data throw the regular admin urls (ex: yoursite/admin/seo/seo-titles).
But really it's not really helpfull and even say it… it's crappy

A cell view is here to help you to have all the seo information directly in the view you want.
You have a product admin edit view. in your Template/Admin/Products/edit.ctp, just add

```
    $cell = $this->cell('Seo.Seobox', ['uri' => Router::url(['_name' => 'catalogView', $product->slugPath])]);
    echo $cell;
?>

```

In this example, I use a named route but you can use a standard array. **Just remember to use the route for which you want to add Seo metas, in this case the public view of a product**.

Actually, the default template doesn't respect the CakePHP default layout, and you surely want to override. To do this, [just follow the conventional way](http://book.cakephp.org/3.0/en/plugins.html#overriding-plugin-templates-from-inside-your-application).

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance12

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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/3564249b08e9bbb162dc9d8ba94a9b8a7563fc6faf1c4c6f0916cdf72d143299?d=identicon)[orgasmicnightmare](/maintainers/orgasmicnightmare)

---

Top Contributors

[![osazos](https://avatars.githubusercontent.com/u/16453882?v=4)](https://github.com/osazos "osazos (20 commits)")

### Embed Badge

![Health badge](/badges/orgasmicnightmare-cakephp-seo/health.svg)

```
[![Health](https://phpackages.com/badges/orgasmicnightmare-cakephp-seo/health.svg)](https://phpackages.com/packages/orgasmicnightmare-cakephp-seo)
```

PHPackages © 2026

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