dspObject
A Mura Scope helper method to dynamically output specific types Mura display objects such as components, forms, and more.
Function Syntax
m.dspObject( object , objectid , siteid )
Parameters
Parameter | Type | Req/Opt | Default | Description |
---|---|---|---|---|
object | string | Req |
The type of object you wish to display. Valid options are:
|
|
objectID | string | Req* |
The Object ID or Title/Name of the object. *The following objects do not require an
|
|
siteID | string | Opt | empty string |
Optionally pass a different SiteID, if you wish to display an object from another site under the same instance of Mura. |
Usage
Use this function to output specific types of Mura display objects.
Examples
Listed below are some examples of how to render specific types of Mura display objects.
Component
The following example outputs a "Component" named "Footer".
<cfoutput> <footer> #m.dspObject(object='component', objectid='Footer')# </footer> </cfoutput>
Form
The following example outputs a "Form" named "Contact Us".
<cfoutput> <aside class="contact-us-wrapper"> #m.dspObject(object='form', objectid='Contact Us')# </aside> </cfoutput>
Category Summary
The following example outputs a "Category Summary" display object. Keep in mind, this will only output something if the section of the site you're currently viewing actually has categorized content.
<cfoutput> #m.dspObject(object='category_summary')# </cfoutput>