Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Mura CMS : In 6.1, you will be able to define your own display events via 'display=someAction'
<cfscript>
// you can even trigger the display event
$.event('display', 'help');
// place this in your Site or Theme eventHandler.cfc
public any function onDisplayRender($) {
var str = '';
switch(arguments.$.event('display')) {
case 'someAction' :
try {
savecontent variable='str' {
include '#arguments.$.siteConfig('themeAssetPath')#/display_objects/someAction.cfm';
}
} catch(any e) {
str = '<p>missing file</p>';
}
break;
case 'help' :
str = '<h1>Hey, you asked for HELP!</h1>';
break;
default :
str = '';
}
return str;
}
</cfscript>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.