38

Yii2 SEO Manager

SEO Manager for every Site

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist julian-b90/yii2-seomanager "*"

or add

"julian-b90/yii2-seomanager": "*"

to the require section of your composer.json file.

Migration

Run the following command in Terminal for database migration:

Linux/Unix:

yii migrate/up [email protected]/julian-b90/yii2-seomanager/migrations

Windows:

yii.bat migrate/up [email protected]/julian-b90/yii2-seomanager/migrations

Usage

Overrite Controller

use julianb90\seomanager\component\Controller; 
class SiteController extends Controller 
{ 
}

Add to modules

'modules' => [         
       'seomanager' => [             
              'class' => 'julianb90\seomanager\Module',         
       ],     
]

content

To get content to every page you can use in the SEO Manger the content field. To print out the content you must you this in your view.

<?php 
/** @var Module $module */ 
$module = Yii::$app->getModule('seomanager'); 
$conten = $module->getContent(); 
if ($conten !== null): ?> 
    <div class="container"> 
      <?= $conten; ?> 
    </div> 
<?php endif; ?>
Prakash S

Prakash S

I would like to introduce myself as a Software professional opting for the career in software industry. I'm Prakash S, a MCA graduate and trained as industry level practice for Software technology. Basically I am a PHP Developer but now days exploring more in HTML5, CSS, AngularJS and jQuery libraries.