Mura Scope Objects - Mura Docs v7.1

Mura Scope Objects

As noted in the Mura Scope section, in addition to the CFML scopes, Mura has its own scope called the Mura Scope. The Mura Scope also has a number of subscope objects, that are essentially wrappers of some of Mura's most common bean objects. In short, they are pre-populated beans, with their own special helper methods. The table below contains details on each of the Mura Scope's subscope objects.

Object Analogous Bean Description
m.globalConfig() configBean Wraps the configBean of the Mura instance in the current request. Includes instance-wide configuration data, such as data collected in the settings.ini.cfm file.
m.siteConfig() site Wraps the site bean of the site in the current request. Includes site configuration data collected via the Site Settings section in the administration area, as well as other useful site-specific information.
m.content() content Wraps the content bean of the content item in the current request. Includes data about a Mura content item, such as the title, summary, body, etc. In addition, there are several content-specific helper methods included. For example, you could get an iterator of any children of the content item, what specific categories the content item has been assigned to, etc.
m.currentUser() user* Wraps the sessionUserFacade for the user initiating the request. The object also has access to the user bean attributes, as well as some special session-specific data, such as whether the current user is logged in, whether the current user is a super user or admin user, etc.
m.event() n/a See the Mura "event" Scope section for details.

Inspecting Available Attributes

For each of the above subscope objects, using CFML's <cfdump> tag, you can easily inspect the available attributes and their values using the code examples below.

<cfdump var="#m.{subscope}().getAllValues()#">

<!--- For example --->
<cfdump var="#m.globalConfig().getAllValues()#">
<cfdump var="#m.siteConfig().getAllValues()#">
<cfdump var="#m.content().getAllValues()#">
<cfdump var="#m.currentUser().getAllValues()#">
<cfdump var="#m.event().getAllValues()#">
<!--- etc. --->