2017 © Pedro Peláez
 

yii2-extension yii2-seo-tools

SEO tools for Yii 2 framework

image

amirax/yii2-seo-tools

SEO tools for Yii 2 framework

  • Tuesday, June 13, 2017
  • by Amirax
  • Repository
  • 3 Watchers
  • 11 Stars
  • 585 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 0 Open issues
  • 6 Versions
  • 5 % Grown

The README.md

Amirax SEO Tools for Yii 2

Installation

The preferred way to install this extension is through composer., (*1)

Either run, (*2)

php composer.phar require amirax/yii2-seo-tools "*"

or add, (*3)

"amirax/yii2-seo-tools": "*"

to the require section of your composer.json file., (*4)

After installation extension run migration:, (*5)

./yii migrate --migrationPath="@vendor/amirax/yii2-seo-tools/src/migrations"

Usage

SEO Meta

In components configuration add the following, (*6)

'components' => [
    'seo' => [
        'class' => 'Amirax\SeoTools\Meta'
    ]
    ...
]

And add SEO extension to bootstrap, (*7)

'bootstrap' => ['log', 'seo']

Extension will automatically load the correct row from the database using the currently running and params.You can optionally override data by specifying them in a parameter array, (*8)

Yii::$app->seo->title = 'Page title';
Yii::$app->seo->metakeys = 'seo,yii2,extension';
Yii::$app->seo->metadesc = 'Page meta description';
Yii::$app->seo->tags['og:type'] = 'article';

You can set the templates for tags. For example:, (*9)

Yii::$app->seo->setVar('USER_NAME', 'Amirax');
Yii::$app->seo->tags['og:title'] = 'Hello %USER_NAME%';

Default variables: * %HOME_URL% - Homepage url * %CANONICAL_URL% - Canonical URL for current page * %LOCALE% - Site locale, (*10)

SEO Redirect

For enabling SEO Redirect add to configuration file, (*11)

'errorHandler' => [
    'class' => 'Amirax\SeoTools\Redirect',
],

The Versions

13/06 2017

dev-master

9999999-dev https://github.com/amirax/yii2-seo-tools

SEO tools for Yii 2 framework

  Sources   Download

MIT

The Requires

 

extension yii2 seo

13/06 2017

v0.2.3

0.2.3.0 https://github.com/amirax/yii2-seo-tools

SEO tools for Yii 2 framework

  Sources   Download

MIT

The Requires

 

extension yii2 seo

25/07 2015

v0.2.2

0.2.2.0 https://github.com/amirax/yii2-seo-tools

SEO tools for Yii 2 framework

  Sources   Download

MIT

The Requires

 

extension yii2 seo

10/06 2015

v0.2.1

0.2.1.0 https://github.com/amirax/yii2-seo-tools

SEO tools for Yii 2 framework

  Sources   Download

MIT

The Requires

 

extension yii2 seo

25/04 2015

v0.2.0

0.2.0.0 https://github.com/amirax/yii2-seo-tools

SEO tools for Yii 2 framework

  Sources   Download

MIT

The Requires

 

extension yii2 seo

25/04 2015

v0.1.0

0.1.0.0 https://github.com/amirax/yii2-seo-tools

SEO tools for Yii 2 framework

  Sources   Download

MIT

The Requires

 

extension yii2 seo