2017 © Pedro Peláez
 

yii-extension yii-seo

Search engine optimization for the Yii PHP framework.

image

crisu83/yii-seo

Search engine optimization for the Yii PHP framework.

  • Friday, March 20, 2015
  • by crisu83
  • Repository
  • 5 Watchers
  • 7 Stars
  • 4,949 Installations
  • PHP
  • 0 Dependents
  • 1 Suggesters
  • 11 Forks
  • 1 Open issues
  • 1 Versions
  • 4 % Grown

The README.md

yii-seo

Search engine optimization for the Yii PHP framework., (*1)

Usage

In layout, (*2)

    <?php Yii::app()->controller->widget(
        'vendor.crisu83.yii-seo.widgets.SeoHead',
        array(
            'httpEquivs'         => array(
                'Content-Type'     => 'text/html; charset=utf-8',
                'X-UA-Compatible'  => 'IE=edge,chrome=1',
                'Content-Language' => 'en-EN'
            ),
            'defaultTitle'       => "My default title",
            'defaultDescription' => "My default description",
            'defaultKeywords'    => "My default keywords",
        )
    ); ?>

In Controller, (*3)

    public function behaviors()
    {
        return array(
            'seo' => array('class' => 'vendor.crisu83.yii-seo.behaviors.SeoBehavior'),
        );
    }

    public function filters()
    {
        return array(
            array('vendor.crisu83.yii-seo.filters.SeoFilter + view'), // apply the filter to the view-action
        );
    }

In view file, (*4)


$this->title = [$model->title, "My cool site!"]; $this->metaDescription = "My page description"; $this->metaKeywords = "My page keywords";

The Versions

20/03 2015

dev-master

9999999-dev https://github.com/crisu83/yii-seo

Search engine optimization for the Yii PHP framework.

  Sources   Download

BSD-3-Clause

yii seo