Skip to content

Instantly share code, notes, and snippets.

@modmedia
modmedia / isotopeCSS.cfm
Last active January 2, 2016 15:19
Create an isotope gallery with Mura Categories as filters
<!--- if using CFStatic --->
<cf_CacheOMatic key="isotopeCSS">
#$.static()
.include('/css/isotope/')
.renderIncludes('css')#
</cf_CacheOMatic>
<!--- Static CSS Include --->
<!--- <link rel="stylesheet" href="#$.siteConfig('themeAssetPath')#/css/isotope/isotope.css"> --->
@modmedia
modmedia / muraSubmitFormDataToSalesForce.cfm
Last active December 29, 2015 15:09
Submit data from a Mura form to Sales Force
<cffunction name="onAfterFormSubmitSave">
<cfargument name="$">
<cfif $.content('title') eq "{content Title}">
<!--- Send Sales Leads to SalesForce --->
<cfhttp method="post" url="https://www.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8">
<cfhttpparam type="formfield" name="oid" value="XXXXXXXXXXX"/>
<cfhttpparam type="formfield" name="retURL" value="http://www.domain.com"/>
<!---
<cfhttpparam type="formfield" name="debug" value="1"/>
<cfhttpparam type="formfield" name="debugEmail" value="[email protected]"/>
@modmedia
modmedia / muraCreateContentNodeFromForm.cfm
Last active December 27, 2015 14:39
Create a Mura content node from a Mura form
<!--- Drop this into your site eventhandler.cfc --->
<cffunction name="onAfterFormSubmitSave" output="true">
<cfif $.event('formid') EQ '{ID of the Mura form}'>
<!--- Get the form result --->
<cfset formBean = $.event().getValue('formresult')>
<!--- Get a new content bean --->
<cfset cBean = application.contentManager.getBean()>
<!--- Set the new node attributes --->
<cfset cBean.setSiteID($.event('siteid'))>