2017 © Pedro Peláez
 

cakephp-plugin cakephp-meta

SEO Plugin for CakePHP 2.x which manages title, meta description, and meta keywords for each page in your application.

image

houseoftech/cakephp-meta

SEO Plugin for CakePHP 2.x which manages title, meta description, and meta keywords for each page in your application.

  • Friday, January 6, 2017
  • by houseoftech
  • Repository
  • 3 Watchers
  • 4 Stars
  • 64 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 1 Open issues
  • 8 Versions
  • 12 % Grown

The README.md

Meta Plugin for CakePHP 2.x

Meta is an SEO Plugin for CakePHP 2.x which manages title, meta description, and meta keywords for each page in your application., (*1)

For CakePHP 3.x compatible version see the 3.x branch., (*2)


Installation

  1. Install manually by putting the contents of this repository in a folder named Meta in your App's Plugin folder. Install with composer by adding the following to your composer.json:, (*3)

    "require": {
        "houseoftech/cakephp-meta": "2.0.0"
    }
    
  2. Add the meta table to your database., (*4)

    CREATE TABLE `meta` (
        `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
        `template` tinyint(1) NOT NULL DEFAULT '0',
        `path` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
        `controller` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
        `action` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
        `pass` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
        `title` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
        `description` text COLLATE utf8_unicode_ci,
        `keywords` text COLLATE utf8_unicode_ci,
        `created` datetime DEFAULT NULL,
        `modified` datetime DEFAULT NULL,
        PRIMARY KEY (`id`)
    ) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci PACK_KEYS=0 ;
    
  3. Add the component to your AppController., (*5)

    public $components = array('Meta.Meta');
    
  4. Call the Meta element in your layout's head., (*6)

    <?php echo $this->element('Meta.meta');?>
    

How to Use

Navigate to the Meta admin page: http://your_domain/admin/meta/meta, (*7)

You can add records manually via the form or you can use the link called 'Find New Paths'. This is an initializer which searches your existing pages located under Views/Pages/ and the pages table in your database. The initializer will attempt to extract descriptions as well., (*8)

Meta Record Fields

Given a URL such as http://your_domain/pages/My-Wonderful-Page-In-Which-I-Explain-All-Things we can break it down to the following fields stored in the meta table., (*9)

Path

This is for your benefit, so you know which page it corresponds to. /pages/My-Wonderful-Page-In-Which-I-Explain-All-Things, (*10)

To create a template use an asterisk as a wildcard. /articles/view/* would match any Path beginning with /articles/view/, (*11)

Controller

pages, (*12)

Action

display, (*13)

Pass

My-Wonderful-Page-In-Which-I-Explain-All-Things, (*14)

When creating a template, leave this field blank., (*15)

Title

The Explanation of All Things, (*16)

Description

All things need some sort of explanation. Explaining all things is not always easy, but I will attempt to do so anyways., (*17)

Keywords

all things, explanation, explaining, all things explained, explanation of all things, (*18)

Templates

When creating a template, you can use variables in the Title, Description, and Keywords fields. Simply use the variable name inside brackets {}., (*19)

The available variables depend on the Controller, but most Pages will have available the following list., (*20)

  • {id} - Automatically assigned integer representing a record in a database.
  • {name} - The human readable title of a Page or Post.
  • {created} - The date and time the record was first created in format yyyy-mm-dd hh:mm:ss.
  • {modified} - The date and time the record was last updated in format yyyy-mm-dd hh:mm:ss.

License

This project is licensed under the terms of the MIT license., (*21)

The Versions

06/01 2017

dev-master

9999999-dev http://github.com/houseoftech/cakephp-meta

SEO Plugin for CakePHP 2.x which manages title, meta description, and meta keywords for each page in your application.

  Sources   Download

MIT

The Requires

 

plugin cakephp meta

06/01 2017

3.x-dev

3.9999999.9999999.9999999-dev http://github.com/houseoftech/cakephp-meta

SEO Plugin for CakePHP 2.x which manages title, meta description, and meta keywords for each page in your application.

  Sources   Download

MIT

The Requires

 

plugin cakephp meta

06/01 2017

3.0.0

3.0.0.0 http://github.com/houseoftech/cakephp-meta

SEO Plugin for CakePHP 2.x which manages title, meta description, and meta keywords for each page in your application.

  Sources   Download

MIT

The Requires

 

plugin cakephp meta

22/03 2016

0.7.1

0.7.1.0 http://github.com/houseoftech/cakephp-meta

SEO Plugin for CakePHP 2.x which manages title, meta description, and meta keywords for each page in your application.

  Sources   Download

MIT

The Requires

 

plugin cakephp meta

22/03 2016

2.0.0

2.0.0.0 http://github.com/houseoftech/cakephp-meta

SEO Plugin for CakePHP 2.x which manages title, meta description, and meta keywords for each page in your application.

  Sources   Download

MIT

The Requires

 

plugin cakephp meta

21/03 2016

0.7.0

0.7.0.0 http://github.com/houseoftech/cakephp-meta

SEO Plugin for CakePHP 2.x which manages title, meta description, and meta keywords for each page in your application.

  Sources   Download

MIT

The Requires

 

plugin cakephp meta

23/03 2015

0.6.1

0.6.1.0 http://github.com/houseoftech/cakephp-meta

SEO Plugin for CakePHP 2.x which manages title, meta description, and meta keywords for each page in your application.

  Sources   Download

MIT

The Requires

 

plugin cakephp meta

20/03 2015

0.6.0

0.6.0.0 http://github.com/houseoftech/cakephp-meta

SEO Plugin for CakePHP 2.x which manages title, meta description, and meta keywords for each page in your application.

  Sources   Download

MIT

The Requires

 

plugin cakephp meta