2017 © Pedro Peláez
 

yii2-extension yii2-cms-seo

SEO module for Yii2

image

infoweb-internet-solutions/yii2-cms-seo

SEO module for Yii2

  • Monday, February 29, 2016
  • by infoweb-internet-solutions
  • Repository
  • 5 Watchers
  • 2 Stars
  • 710 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 3 Forks
  • 1 Open issues
  • 11 Versions
  • 0 % Grown

The README.md

SEO module for Yii 2

Installation

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

Either run, (*2)

php composer.phar require infoweb-internet-solutions/yii2-cms-seo "*"

or add, (*3)

"infoweb-internet-solutions/yii2-cms-seo": "*"

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

Usage

Once the extension is installed, simply modify your application configuration as follows:, (*5)

Your backend configuration as follows:, (*6)

'modules' => [
    ...
    'seo' => [
        'class' => 'infoweb\seo\Module',
    ],
],

Import the translations and use category 'infoweb/seo':, (*7)

yii i18n/import @infoweb/seo/messages

To use the module, execute yii migration, (*8)

yii migrate/up --migrationPath=@vendor/infoweb-internet-solutions/yii2-cms-seo/migrations

Behavior

To use SeoBehavior, insert the following code to your ActiveRecord class:, (*9)

use infoweb\seo\behaviors\SeoBehavior;

public function behaviors()
{
    return [
        'seo' => [
            'class' => SeoBehavior::className(),
            'titleAttribute' => 'title',
        ],
    ];
}

Add this code to your view, (*10)

 // Initialize the tabs
$tabs = [
    ...
    [
        'label' => 'SEO',
        'content' => $this->render('@infoweb/seo/views/behaviors/seo/_seo_tab', ['model' => $model, 'form' => $form]),
    ],
];

Configuration

All available configuration options are listed below with their default values., (*11)


allowContentDuplication (type: boolean, default: true)

If this option is set to true, the duplicateable jquery plugin is activated on all translateable attributes., (*12)


The Versions

29/02 2016
20/10 2014
03/10 2014
01/10 2014

0.0.1

0.0.1.0

SEO module for Yii2

  Sources   Download

MIT

The Requires

 

yii2 seo infoweb yii2-cms-seo