承接 chemezov/yii-seo 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

chemezov/yii-seo

最新稳定版本:v1.0.4

Composer 安装命令:

composer require chemezov/yii-seo

包简介

Search engine optimization for the Yii PHP framework.

关键字:

README 文档

README

Search engine optimization for the Yii PHP framework.

Based on crisu83's yii-seo.

Usage

In layout

    <?php Yii::app()->controller->widget(
        'vendor.chemezov.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

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

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

In view file


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

统计信息

  • 总下载量: 3.38k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 9
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2015-03-20