EditorModel Notifications
This page is a work in progress and may undergo further revisions, updates, or amendments. The information contained herein is subject to change without notice.
EditorModel notifications are no longer handled on the server-side, but on the client-side. As the documentation effort progresses, the samples on this page will be updated accordingly.
EditorModel notifications enable you to manipulate the model used by the backoffice before it is loaded into an editor. For example the SendingContentNotification
is published right before a content item is loaded into the backoffice for editing. It is therefore the perfect notification to use to set a default value for a particular property, or perhaps to hide a property/tab/Content App from a certain editor.
Usage
Example usage of the SendingContentNotification
- e.g. set the default PublishDate for a new NewsArticle to be today's Date:
Another example could be to set the default Member Group for a specific Member Type using SendingMemberNotification
:
Notifications
SendingContentNotification
ContentItemDisplay Content
IUmbracoContext UmbracoContext
Published right before the editor model is sent for editing in the content section. NOTE: Content is a Umbraco.Cms.Core.Models.ContentEditing.ContentItemDisplay type which contains the tabs and properties of the elements about to be loaded for editing.
SendingMediaNotification
MediaItemDisplay Media
IUmbracoContext UmbracoContext
Published right before the editor model is sent for editing in the media section NOTE: Media is a Umbraco.Cms.Core.Models.ContentEditing.MediaItemDisplay type which in turn contains the tabs and properties of the elements about to be loaded for editing.
SendingMemberNotification
MemberDisplay Member
IUmbracoContext UmbracoContext
Published right before the editor model is sent for editing in the member section. NOTE: Member is a Umbraco.Cms.Core.Models.ContentEditing.MemberDisplay type which in turn contains the tabs and properties of the elements about to be loaded for editing.
SendingUserNotification
UserDisplay User
IUmbracoContext UmbracoContext
Published right before the editor model is sent for editing in the user section. NOTE: User is a Umbraco.Cms.Core.Models.ContentEditing.UserDisplay type which in turn contains the tabs and properties of the elements about to be loaded for editing.
SendingDashboardsNotification
IEnumerable<Tab<IDashboardSlim>> Dashboards
IUmbracoContext UmbracoContext
Published right before the a dashboard is retrieved in a section. NOTE: Dashboards is a collection of IDashboardSlim, each object gives you access to Label, Alias, Properties, whether it's expanded, and whether it IsActive.
SendingAllowedChildrenNotification
IEnumerable<ContentTypeBasic> Children
IUmbracoContext UmbracoContext
Published right before the allowed children of the selected Content Type are sent back during content creation in the Content Section. NOTE: Children is a collection of ContentTypeBasic, each object gives you access to Alias, Description, Thumbnail and more. You can remove or add new children to the list in the notification.
Display models
ContentItemDisplay
A model representing a content item to be displayed in the backoffice
TemplateAlias
Urls
AllowPreview - Determines whether previewing is allowed for this node, By default this is true but by using notifications developers can toggle this off for certain documents if there is nothing to preview
AllowedActions - The allowed 'actions' based on the user's permissions - Create, Update, Publish, Send to publish
IsBlueprint
Tabs - Defines the tabs containing display properties
Properties - properties based on the properties in the tabs collection
And more...
MediaItemDisplay
A model representing a media item to be displayed in the backoffice
Alias
Tabs - Defines the tabs containing display properties
Properties - properties based on the properties in the tabs collection
And more...
MemberDisplay
A model representing a member to be displayed in the backoffice
Username
Email
Tabs - Defines the tabs containing display properties
Properties - properties based on the properties in the tabs collection
And more...
Samples
The EditorModel notifications gives you a lot of options to customize the backoffice experience. You can find inspiration from the various samples provided below:
Last updated