\PartialThemesExtension
An extension that helps out with the application of a "Partial Theme"
A Partial Theme is one in which only certain templates are defined, that
are considered to 'override' those defined in the main theme currently
applied to the site. This allows for a subsection to define several templates
differently from the 'main' theme but without needing to copy large chunks of
code (eg the master Page template)
- Author: <marcus@silverstripe.com.au>
- License: BSD License http://www.silverstripe.org/bsd-license
Synopsis
class PartialThemesExtension
extends DataExtension
{
- // members
- private static array $db = ;
- protected ThemeHelper $themeHelpers;
- // methods
- public void updateSettingsFields()
- public void appliedTheme()
- public void appliedPartialTheme()
- public void overridePartialTemplates()
- public void partialRenderWith()
- public void partialInclude()
- protected void findAlternate()
- protected void getThemeHelper()
- public void onBeforeInit()
- public void onAfterInit()
- public string getThemeHierarchyClasses()
Hierarchy
Extends
- DataExtension
Members
Methods
protected
- findAlternate() — Find an alternative template for the current page in a separate theme
- getThemeHelper()
public
- appliedPartialTheme()
- appliedTheme()
- getThemeHierarchyClasses() — Return the applied themes as a string of classes
- onAfterInit()
- onBeforeInit()
- overridePartialTemplates()
- partialInclude()
- partialRenderWith()
- updateSettingsFields()