Download the PHP package romi45/yii2-seo-behavior without Composer

On this page you can find all versions of the php package romi45/yii2-seo-behavior. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package yii2-seo-behavior

Seo meta contents behavior for Yii 2

This extension provides behavior functions for seo meta tags and title tag support. Also provides view helper for registering meta tags and title.

Installation

My favorite way to install this extension is through composer.

Either run

or add

to the require section of your composer.json file.

and then run migration

Configuring

First you need to configure your model:

Now you are ready to use it on form

As you can see, seoTitle, seoKeywords and seoDescription is the attributes (by default) from which we can access SEO content of model.

Once you post a form with the above fields, they will be automatically saved and linked to our Post model.

To register meta tags and set title in view use following code:

Do not forget about title tag in layout.

Patterns

You can use patterns in values and it will replaced with some model properties, application config property, application parameter or view parameter type will defined by prefixes.

Model Attribute

For example will replace with

Application Global Config Attribute

For example will replace with

Application Global Parameter Attribute

For example will replace with

View Global Parameter Attribute

For example will replace with .

Separator

By default separator pattern replaced with '-'. If you want to use another value for separator you need to identify param.

Hint: instead of 'titleSeparator' you can use constant value.

Global Seo Pattern

You can use global seo pattern to all model istance by set is_global parameter to to 1 for model seoContent. Just create form in view like this:

And process it at you controller like this:

Sql Caching

For enable sql queries caching set enableSqlQueryCache parameter at behavior config to to true. Also you can set cache duration by sqlQueryCacheDuration parameter. Example:

License

The MIT License (MIT). Please see License File for more information.


All versions of yii2-seo-behavior with dependencies

PHP Build Version
Package Version
Requires yiisoft/yii2 Version ~2.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package romi45/yii2-seo-behavior contains the following files

Loading the files please wait ....