Skip to content

Latest commit

 

History

History
48 lines (33 loc) · 1.04 KB

README.md

File metadata and controls

48 lines (33 loc) · 1.04 KB

Configuration

Generating the Page Meta

To generate the Page / DataObject Meta tags add the following include within the of your page.

<head>
    $PageMetaTags
</head>

Page SEO Extension

By default the SeoPageExtension is applied to the Page object. An SEO and Sitemap tab will be available within the CMS on each Page.

Adding the SEO Extension to a DataObject

DataObjects that wish to act as pages need the SeoExtension applied to them.

MyObject:
  extensions:
    - PlasticStudio\SEO\Model\Extension\SeoExtension

This extension is the same as the SeoPageExtension apart from it contains a few extra db fields.

  • Title
  • URLSegment
  • MetaDescription

If you apply the SeoExtension to a DataObject and wish to auto generate the Meta from it you need to set it as the SEO page object in your controller:

class MyPage_Controller extends PageController
{
    public function init()
    {
        parent::init();

        $page = MyObject::get_by_id(1);

        $this->setSeoObject($page);
    }
}