PHPackages                             mgrechanik/yii2-seo-categories - 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. [Admin Panels](/categories/admin)
4. /
5. mgrechanik/yii2-seo-categories

ActiveYii2-extension[Admin Panels](/categories/admin)

mgrechanik/yii2-seo-categories
==============================

Active Record hierarchical SEO categories and tags for Yii2 framework

1.0.0(6y ago)015BSD-3-ClausePHP

Since Jan 25Pushed 6y ago1 watchersCompare

[ Source](https://github.com/mgrechanik/yii2-seo-categories)[ Packagist](https://packagist.org/packages/mgrechanik/yii2-seo-categories)[ RSS](/packages/mgrechanik-yii2-seo-categories/feed)WikiDiscussions master Synced yesterday

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

Active Record hierarchical SEO categories and tags for Yii2 framework
=====================================================================

[](#active-record-hierarchical-seo-categories-and-tags-for-yii2-framework)

[Русская версия](docs/README_ru.md)

Table of contents
-----------------

[](#table-of-contents)

- [Goal](#goal)
- [Demo](#demo)
- [Installing](#installing)
- [Module settings](#settings)

---

Goal
-----

[](#goal-)

This extension gives you a **variation** of [categories module](https://github.com/mgrechanik/yii2-categories-and-tags), in which the [opportunity](https://github.com/mgrechanik/yii2-categories-and-tags#custom-ar) to create any your own `Active Record` category models was given.

We suggest that when creating pages at **frontend** to display associated content of the category (or tag) we would need to manage SEO information of such category page.

Respectively we add next fields to our SEO category `Active Record` model:

- `name` to name category
- `title` for content of `` tag
- `meta_description` for value of `content` attribute of `` tag
- `meta_keywords` for value of `content` attribute of `` tag
- `meta_other` to inserting any other `html` meta tags you may need
- `slug` serves as a "slug", or tail, in the page address

> With all this in module's settings you may choose not to use `meta_other`
> or `slug` fields and they will not appear in the web form of creating/editing SEO category

---

Installing
-----------

[](#installing-)

#### Installing through composer:

[](#installing-through-composer)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).:

Either run

```
composer require --prefer-dist mgrechanik/yii2-seo-categories

```

or add

```
"mgrechanik/yii2-seo-categories" : "~1.0.0"

```

to the require section of your `composer.json`

#### Migrations

[](#migrations)

This extension comes with two migrations:

- the first creates SEO categories table with all indexes needed
- the second creates unique index for `slug` field

You can run both of them:

```
php yii migrate --migrationPath=@vendor/mgrechanik/yii2-seo-categories/src/console/migrations

```

, or when you do not use `slug` field run only the first migration:

```
php yii migrate 1 --migrationPath=@vendor/mgrechanik/yii2-seo-categories/src/console/migrations

```

#### Setting the module up

[](#setting-the-module-up--)

As was mentioned in the [basic categories module](https://github.com/mgrechanik/yii2-categories-and-tags#goal), this module follows the approach of *universal module*, and since it gives you only **backend** pages when you set it up into your application specify the next `mode` :

```
    'modules' => [
        'seocategory' => [
            'class' => 'mgrechanik\yii2seocategory\Module',
            'mode' => 'backend',
            // Other module settings
        ],
        // ...
    ],
```

Done. When you access `/seocategory` page you will see all your SEO categories in a form of tree.

---

Module settings
----------------

[](#module-settings-)

[Setting up](#setup) the module into application, along with all properties of the [base categories module](https://github.com/mgrechanik/yii2-categories-and-tags#settings), we can use it's next properties:

#### `$useMetaOtherField = false`

[](#usemetaotherfield--false)

\- Whether to use `other meta tags` field

#### `$useSlugField = true`

[](#useslugfield--true)

\- Whether to use `slug` field. It is supposed to be unique

#### `$slugPattern`

[](#slugpattern)

\- When we use previous field in this property we set up regular expression of expected symbols

#### `$showTitleColumnAtIndexPage = true`

[](#showtitlecolumnatindexpage--true)

\- Whether to display `title` field in the categories list grid

#### `$showSlugColumnAtIndexPage = false`

[](#showslugcolumnatindexpage--false)

\- Whether to display `slug` field in the categories list grid

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity56

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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2300d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/83919f51df37e9d419895f01a9d4f55ef44c0dc764aec2a57081b6c5e2a3ed8a?d=identicon)[mgrechanik](/maintainers/mgrechanik)

---

Top Contributors

[![mgrechanik](https://avatars.githubusercontent.com/u/5772506?v=4)](https://github.com/mgrechanik "mgrechanik (1 commits)")

---

Tags

treeyii2crudactive-recordtagscategoriesseoyii 2categoryhierarchicaluniversal module

### Embed Badge

![Health badge](/badges/mgrechanik-yii2-seo-categories/health.svg)

```
[![Health](https://phpackages.com/badges/mgrechanik-yii2-seo-categories/health.svg)](https://phpackages.com/packages/mgrechanik-yii2-seo-categories)
```

###  Alternatives

[schmunk42/yii2-giiant

Gii CRUD generator for Yii 2 Framework

269471.5k17](/packages/schmunk42-yii2-giiant)

PHPackages © 2026

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