Seo Manager for every Site
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist spanjeta/yii2-seo "*"
or add
"spanjeta/yii2-seo": "*"
to the require section of your composer.json
file.
Run the following command in Terminal for database migration:
Linux/Unix:
yii migrate/up --migrationPath=@vendor/spanjeta/yii2-seo/migrations
Windows:
yii.bat migrate/up --migrationPath=@vendor/spanjeta/yii2-seo/migrations
Add to modules
```php
'modules' => [
'seomanager' => [
'class' => 'spanjeta\modules\seomanager\Module',
],
]
Pretty Url's /seomanager
No pretty Url's index.php?r=seomanager
To get content to every page you can use in the seomanger 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; ?>
Comments