Custom Sub Scopes

You can also create custom Mura Scope keys. These keys are also available to all other Mura Scope instances instantiated for the remainder of the request life cycle.

$.setCustomMuraScopeKey()

To create a custom Mura Scope key, add a method to the site's or theme's eventHandler.cfc onSiteRequestStart() method as follows:

To reference the custom key, you could then use:

The custom key does not necessarily have to be a string. You could, for example, pass in an object:

Then, to reference any of the objects methods, you could use:

This assumes someObject.cfc has a public or remote method named doSomeMethod().