\FrontendEditableExtension
An extension that allows theme authors to mark certain regions as editable
- Author: Marcus Nyeholt <marcus@silverstripe.com.au>
Synopsis
class FrontendEditableExtension
extends DataExtension
{
- // members
- public static array $has_one = ;
- // methods
- public void onBeforeWrite()
- public void updateCMSFields()
- public boolean LiveSite()
- public boolean FrontendEditAllowed()
- public String EditableField()
Hierarchy
Extends
- DataExtension
Tasks
Line | Task |
---|---|
92+ | : Refactor this so that the field creation etc is actually done based on the type of the field - eg if it's an HTML field use niceditor, if it's a text field use textfield, etc etc Needs some adjustment to the frontend so that fields other than the native nicedit work nicely. |
Members
public
- $has_one
Methods
public
- EditableField() — Return an html fragment that can be used for editing a given field on the frontend of the website
- FrontendEditAllowed() — Indicates whether the current user can edit the current fields on the frontend
- LiveSite() — Are we viewing this page on the live site?
- onBeforeWrite() — Make sure to set a creator!
- updateCMSFields() — Each page that is editable should have an "Owner"