This file contains 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> | |
dbUtility.setTable('tcontent') | |
.addPrimaryKey('TContent_ID') | |
.addIndex('ContentID') | |
.addIndex('ContentHistID') | |
.addIndex('SiteID') | |
.addIndex('ParentID') | |
.addIndex('RemoteID') | |
.addIndex('ModuleID') | |
.addIndex('changesetID') |
This file contains 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> | |
param name='form.rssurl' default='http://www.npr.org/rss/rss.php?id=1014'; | |
param name='form.parentfilename' default='blog'; | |
param name='form.isSubmitted' default='false'; | |
param name='form.istest' default='true'; | |
param name='form.siteid' default='default'; | |
$ = application.serviceFactory.getBean('$').init(form.siteid); | |
if ( !$.currentUser().isSuperUser() && !$.currentUser().isInGroup('admin') ) { |
This file contains 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
component extends='mura.cfobject' { | |
// drop this in your site or theme eventHandler.cfc | |
public any function onRenderStart($) { | |
// allow for a 'View As PDF' link (e.g., <a href="./?viewAsPDF=1">View As PDF</a>) | |
if ( IsBoolean(arguments.$.event('viewAsPDF')) && arguments.$.event('viewAsPDF') ) { | |
arguments.$.content('template', 'pdf.cfm'); | |
} | |
This file contains 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) /> |
This file contains 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 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 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 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 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){ |
NewerOlder