index.cfm - Mura Docs v6

index.cfm

The root index.cfm for a plugin is where developers can either display documentation or create custom admin functionality. This file is, in effect, the base of your plugin's administrator page, and is displayed when a user clicks on the plugin's name in the Mura Plugin administrator area.

<cfinclude template="plugin/config.cfm" />
<cfsavecontent variable="body">
<cfoutput>
<h2>#pluginConfig.getName()#</h2>
<p>Description of you plugin goes here.</p>
</cfoutput>
</cfsavecontent>
<cfoutput>
#$.getBean('pluginManager').renderAdminTemplate(
body=body
, pageTitle=pluginConfig.getName()
)#
</cfoutput>

To retain the Mura administrator's look and feel, you can use the PluginConfig's helper method renderAdminTemplate(). The wraps the value passed via the body argument with the main admin layout allowing for seamless user experience. A complete example of this is:

$.getBean('pluginManager').renderAdminTemplate(
body={body}
, pageTitle={htmlPageTitle}
, jsLib={prototype|jquery}
, jsLibLoaded={true|false}
);