Skip to content

Build mirror of nyeholt/silverstripe-usertemplates

Notifications You must be signed in to change notification settings

symbiote/silverstripe-usertemplates

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SilverStripe UserTemplates

Allows cms users to apply templates that are created and defined within the CMS directly, including CSS and JavaScript files

Installation

Add the following to your Page_Controller class:

public function getViewer($action) {
    $viewer = parent::getViewer($action);
	
	$this->extend('updateViewer', $action, $viewer);
	
    return $viewer;
}

Usage

Create a new template from the admin/templates section.

The Use of the template indicates whether it will be applied as a 'main' template or just the 'Layout' of the page.

The Content field should be defined as per a normal SilverStripe template

Any CSS or JS files uploaded will be included using Requirements:: calls

On a page, navigate to the Settings -> Theme tab. Select the relevant template to use.

If "Inherit" is set, then any parent page with a custom template defined will be used.

Requirements

About

Build mirror of nyeholt/silverstripe-usertemplates

Resources

Stars

Watchers

Forks

Packages

No packages published