Content-Related Events - Mura Docs v7.0

Content-Related Events

The events listed below are specifically related to content items.

Content Editing Events

Event Rendered Description
onBeforeContentSave   Announced before content is saved.
onBefore{Type}Save  

Announced before content is saved, based on its type. For example:

  • onBeforePageSave
  • onBeforeFolderSave
  • onBeforeCalendarSave
  • onBeforeLinkSave
onBefore{Type}{Subtype}Save  

Announced before content is saved, based on its type and subtype. For example:

  • onBeforePageDefaultSave
  • onBeforeFolderDefaultSave
  • onBeforeCalendarDefaultSave
  • onBeforeLinkDefaultSave
onAfterContentSave   Announced after content is saved.
onAfter{Type}Save  

Announced after content is saved, based on its type.  For example:

  • onAfterPageSave
  • onAfterFolderSave
  • onAfterCalendarSave
  • onAfterLinkSave
onAfter{Type}{Subtype}Save   Announced after content is saved, based on its type and subtype.
onBeforeContentDelete   Announced before content is deleted.
onBefore{Type}Delete   Announced before content is deleted, based on its type.
onBefore{Type}{Subtype}Delete   Announced before content is deleted, based on its type and subtype.
onContentDelete   Announced before content is deleted.
on{Type}Delete   Announced before content is deleted, based on its type.
on{Type}{Subtype}Delete   Announced before content is deleted, based on its type and subtype.
onAfterContentDelete   Announced after content is deleted.
onAfter{Type}Delete   Announced after content is deleted, based on its type.
onAfter{Type}{Subtype}Delete   Announced after content is deleted, based on its type and subtype.

Content Version History Events

Event Rendered Description
onContentDeleteVersionHistory   Announced before a content item's entire version history is deleted.
onBeforeContentDeleteVersionHistory   Announced before a content item's entire version history is deleted.
onBefore{Type}DeleteVersionHistory   Announced before a content item's entire version history is deleted, based on its type.
onBefore{Type}{Subtype}DeleteVersionHistory   Announced before a content item's entire version history is deleted, based on its type and subtype.
onBefore{Type}{Subtype}DeleteVersion   Announced before a content item's entire version history is deleted, based on its type and subtype.
on{Type}DeleteVersionHistory   Announced before a content item's entire version history is deleted, based on its type.
on{Type}{Subtype}DeleteVersionHistory   Announced before a content item's entire version history is deleted, based on its type and subtype.
onAfterContentDeleteVersionHistory   Announced after a content item's entire version history is deleted.
onAfter{Type}DeleteVersionHistory   Announced after a content item's entire version history is deleted, based on its type.
onAfter{Type}{Subtype}DeleteVersionHistory   Announced after a content item's entire version history is deleted, based on its type and subtype.
onContentDeleteVersion   Announced before a specific version of a content item is deleted.
onBeforeContentDeleteVersion   Announced before a specific version of a content item is deleted.
onBefore{Type}DeleteVersion   Announced before a specific version of a content item is deleted, based on its type.
onBefore{Type}{Subtype}DeleteVersion   Announced before a specific version of a content item is deleted, based on its type and subtype.
onAfterContentDeleteVersion   Announced after a specific version of a content item is deleted.
onAfter{Type}DeleteVersion   Announced after a specific version of a content item is deleted, based on its type.
onAfter{Type}{Subtype}DeleteVersion   Announced after a specific version of a content item is deleted, based on its type, and subtype.

Content Rendering Events

Event Rendered Description
onSite404   Announced when a requested content item does not exist.
onSiteCKEditorConfigRender X This event enables developers to programmatically add data to the CKEditor config.js.cfm file.
onSiteCKFinderConfig   This event enables developers to programmatically access, and manipulate the configuration settings for instances of CKFinder.
onContentEdit X Renders a custom tab when editing content. Useful for creating a custom user interface to collect data on custom class extension attributes where the specified container is "Custom UI". Use m.event('tabLabel', 'Your Label Name') to set the tab label name.
on{Type}Edit X

For example:

  • onPageEdit
  • onFolderEdit
  • onCalendarEdit
  • onLinkEdit
on{Type}{Subtype}Edit X

For example:

  • onPageDefaultEdit
  • onFolderDefaultEdit
  • onCalendarDefaultEdit
  • onLinkDefaultEdit

See https://gist.github.com/stevewithington/f3dd405d5a188fb594a1 for example useage.

onContentEditMessageRender X Announced before rendering the tabbed form on the "Edit Content" screen. Allows you to return a string to display as a message. See the Admin Alerts and Help Blocks section of the Mura UI Markup Conventions guide for markup-related information.
on{Type}EditMessageRender X

Announced before rendering the tabbed form on the "Edit Content" screen, based on the content type. Allows you to return a string to display as a message. See the Admin Alerts and Help Blocks section of the Mura UI Markup Conventions guide for markup-related information. For example:

  • onPageEditMessageRender
  • onFolderEditMessageRender
  • onCalendarEditMessageRender
  • onLinkEditMessageRender
on{Type}{Subtype}EditMessageRender X

Announced before rendering the tabbed form on the "Edit Content" screen, based on the content type and subtype. Allows you to return a string to display as a message. See the Admin Alerts and Help Blocks section of the Mura UI Markup Conventions guide for markup-related information. For example:

  • onPageDefaultEditMessageRender
  • onFolderDefaultEditMessageRender
  • onCalendarDefaultEditMessageRender
  • onLinkDefaultEditMessageRender
onFeedEditMessageRender X Announced before rendering the tabbed form on the "Edit Local Index / Collection" screen. Allows you to return a string to display as a message. See the Admin Alerts and Help Blocks section of the Mura UI Markup Conventions guide for markup-related information.
onSiteSearchRender X Announced before rendering search results. If a string is returned, it will be used in lieu of the default display.
onDisplayRender X Announced when a value exists for the display event (e.g., ./?display=help). Allows developers to return a custom display for the body area of a layout template based on the display URL parameter. Visit https://gist.github.com/stevewithington/6271863 for example usage.
on{Type}{Subtype}BodyRender X

For example:

  • onPageDefaultBodyRender
  • onFolderDefaultBodyRender
  • onCalendarDefaultBodyRender
  • onLinkDefaultBodyRender
on{Type}BodyRender X

For example:

  • onPageBodyRender
  • onFolderBodyRender
  • onCalendarBodyRender
  • onLinkBodyRender

Comments Events

Event Rendered Description
onBeforeCommentCreate   Announced before comment is created.
onBeforeCommentSave   Announced before a comment is saved.
onBeforeCommentUpdate   Announced before a comment is updated.
onBeforeCommentDelete   Announced before a comment is deleted.
onAfterCommentCreate   Announced after a comment is created.
onAfterCommentSave   Announced after a comment is saved.
onAfterCommentUpdate   Announced after a comment is updated.
onAfterCommentDelete   Announced after a comment is deleted.
onBeforeCommentUndelete   Announced before a comment is undeleted.
onAfterCommentUndelete   Announced after a comment is undeleted.
onBeforeCommentFlag   Announced before a comment is flagged.
onAfterCommentFlag   Announced after a comment is flagged.
onBeforeCommentMarkAsSpam   Announced before a comment is marked as spam.
onAfterCommentMarkAsSpam   Announced after a comment is marked as spam.
onBeforeCommentUnMarkAsSpam   Announced before a comment is unmarked as spam.
onAfterCommentUnMarkAsSpam   Announced after a comment is unmarked as spam.

Category Events

Event Rendered Description
onBeforeCategoryCreate   Announced before category is created.
onBeforeCategorySave   Announced before a category is saved.
onBeforeCategoryUpdate   Announced before a category is updated.
onBeforeCategoryDelete   Announced before a category is deleted.
onAfterCategoryCreate   Announced after a category is created.
onAfterCategorySave   Announced after a category is saved.
onAfterCategoryUpdate   Announced after a category is updated.
onAfterCategoryDelete   Announced after a category is deleted.

File-specific Events

Event Rendered Description
onFileEdit X Renders a custom tab when editing "file" content types. Useful for creating a custom user interface to collect data on custom class extension attributes where the specified container is "Custom UI". Use m.event('tabLabel', 'Your Label Name') to set the tab label name.
onFileDefaultEdit X Same as onFileEdit, but using the subtype to be more specific.
onBeforeFileCache    
onFileCache    
onAfterFileCache    
onFileCacheDelete    
onBeforeFileCacheDelete    
onAfterFileCacheDelete    
onBeforeFileRender    
onAfterFileRender    
onBeforeFilenameCreate    
onAfterFilenameCreate    

Form-specific Events

Event Rendered Description
onFormElementBasicTabRender X Announced when rendering a Mura Form element.
onForm{Subtype}BodyRender X Announced before rendering a form.
onBeforeFormSubmitSave   Announced before a submitted form has been saved.
onBeforeForm{Subtype}SubmitSave   Announced before a submitted form with a subtype has been saved.
onAfterFormSubmitSave   Announced after a submitted form has been saved.
onAfterForm{Subtype}SubmitSave   Announced after a submitted form with a subtype has been saved.
onFormSubmitErrorRender X Announced before displaying any errors from the form submission.
onFormSubmitResponseRender X Announced when rendering the "success" response.
onBeforeFormSubmitRedirect X Announced after the "success" response has rendered, and if request.redirect_url has been defined. Useful for rendering a custom response before displaying the request.redirect_url along with a request.redirect_label to display text for the link. Otherwise, if redirect_url is defined without a redirect_label, Mura will forward the user to the URL.

Feed-specific Events

Event Rendered Description
onBeforeFeedCreate   Announced before a feed is created.
onBeforeFeedSave   Announced before a feed is saved.
onBeforeFeedUpdate   Announced before a feed is updated.
onBeforeFeedDelete   Announced before a feed is deleted.
onFeedCreate   Announced after a feed is created.
onFeedSave   Announced after a feed is saved.
onFeedUpdate   Announced after a feed is updated.
onFeedDelete   Announced after a feed is deleted.
onAfterFeedCreate   Announced after a feed is created.
onAfterFeedSave   Announced after a feed is saved.
onAfterFeedUpdate   Announced after a feed is updated.
onAfterFeedDelete   Announced after a feed is deleted.