Skip to content

Latest commit

 

History

History
23 lines (16 loc) · 494 Bytes

getting-started.md

File metadata and controls

23 lines (16 loc) · 494 Bytes

Getting started

Add the following to your Page_Controller class:

public function getViewer($action) {
    $viewer = parent::getViewer($action);

	$this->extend('updateViewer', $action, $viewer);

    return $viewer;
}

Add configuration to bind the extension into place

SilverStripe\CMS\Model\SiteTree:
  extensions: 
    - Symbiote\UserTemplates\UserTemplatesExtension
PageController:
  extensions:
    - Symbiote\UserTemplates\UserTemplatesControllerExtension