This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--- Drop this in your Site or Theme Event Handler ---> | |
<cffunction name="onAdminHTMLFootRender"> | |
<cfargument name="event"> | |
<cfargument name="$"> | |
<cfset var scripts = ''> | |
<cfif StructKeyExists(url, 'muraAction') and url.muraAction eq 'cArch.edit'> | |
<cfsavecontent variable="scripts"> | |
<script> | |
jQuery(document).ready(function($){ | |
var newSummary = 'My Summary ' + '<i class="icon-question-sign"></i>'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
public any function standardPostLogoutHandler($, event) { | |
// you could redirect the user to any url you want here | |
location(url=arguments.$.createHREF(filename='about'), addtoken=false); | |
} | |
</cfscript> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
userStrikesBean = $.getBean('userstrikes').init(username=$.currentUser('username'), configbean=$.globalConfig()); | |
WriteDump(var=userStrikesBean.getStrikes()); | |
</cfscript> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--- 1) Create a form with a hidden form field like shown below, and place it in a layout template, or in a display object, etc. ---> | |
<form method="post"> | |
<input type="text" name="myField" value="Some Value"> | |
<input type="hidden" name="myFormIsSubmitted" value="true"> | |
<input type="submit"> | |
</form> | |
<cfscript> | |
// 2) In the eventHandler.cfc (Site, Theme, Plugin, or other custom handler) you could listen for the even in one of Mura's eventHandlers such as 'onRenderStart' | |
public any function onRenderStart(event, m){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
1) Drop this in your theme /{SiteID}/includes/themes/{Theme}/config.xml.cfm | |
--> | |
<theme> | |
<extensions> | |
<extension type="Folder" subType="FAQ" availableSubTypes="Page/Question" iconClass="icon-question-sign"> | |
</extension> | |
<extension type="Page" subType="Question" iconClass="icon-question" hasSummary="0" hasBody="0" hasAssocFile="0"> | |
</extension> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
// The Mura Scope : in order to access site-specific helpers (e.g., $.siteConfig()), we'll initialize it with a siteid. | |
$ = StructKeyExists(session, 'siteid') | |
? application.settingsManager.getBean('$').init(session.siteid) | |
: application.settingsManager.getBean('$').init('default'); | |
// If you're not in the context of a Front-End Request, then there is NO ContentBean! | |
// So, we need to set it if we want to access it | |
// contentBean = $.getBean('content').loadBy(filename='home'); | |
// $.setContentBean(contentBean); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
// drop this in your eventHandler.cfc | |
public any function yourMethod() { | |
// you do something here | |
} | |
public any function onApplicationLoad($) { | |
arguments.$.getBean('someBean').injectMethod('someMethod', yourMethod); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
formName = 'Information Request'; | |
rsData = QueryNew(''); | |
dcm = $.getBean('dataCollectionManager'); | |
</cfscript> | |
<cfoutput> | |
<cfif !Len($.event('responseid'))> | |
<!--- All Form Submission Results ---> | |
<cfscript> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--- Place this either at the top of your file, or at the beginning of a block of code you wish to trace ---> | |
<cfset myTracePoint = $.initTracePoint('yourFilenameOrOtherDescriptionToIdentifyThisTracePointGoesHere') /> | |
<!--- file content or block of code goes here ---> | |
<!--- Place this either at the bottom of your file, or at the end of a block of code you wish to trace ---> | |
<cfset $.commitTracePoint(myTracePoint) /> |