Skip to content

Instantly share code, notes, and snippets.

@bowler865
bowler865 / mura-dspDescendants.cfm
Created May 27, 2022 15:11 — forked from stevewithington/mura-dspDescendants.cfm
Mura CMS: How to create custom navigation with permissions applied, based on a contentID and its children.
<!---
Place this function in your Site or Theme contentRenderer.cfc
Invoke by calling `$.dspDescendants()`
--->
<cffunction name="dspDescendants">
<cfargument name="contentid" type="string" default="#$.content('contentid')#" />
<cfset var local = {} />
<cfset local.cBean = $.getBean('content').loadBy(contentid=arguments.contentid) />
<cfsavecontent variable="local.str">
@bowler865
bowler865 / mura-head-meta-og.cfm
Created July 8, 2019 18:26 — forked from stevewithington/mura-head-meta-og.cfm
Mura CMS: Sample Open Graph Meta Tags for a Mura CMS Website
<!--- Open Graph (http://ogp.me) --->
<meta property="og:site_name" content="#esapiEncode('html_attr', m.siteConfig('site'))#" />
<meta property="og.locale" content="#m.siteConfig('javalocale')#" />
<meta property="og:title" content="#esapiEncode('html_attr', m.content('title'))#" />
<meta property="og:type" content="website" />
<meta property="og:url" content="#m.createHref(filename=m.content('filename'), complete=true)#" />
<cfif Len(m.getURLForImage(fileid=m.content('fileid')))>
<meta property="og:image" content="#m.getURLForImage(fileid=m.content('fileid'), size='large', complete=true)#" />
</cfif>
<cfif Len(m.content('metadesc'))>
@bowler865
bowler865 / Mura-Form-Recaptcha.cfm
Last active March 22, 2019 17:38
Mura-Form-Recaptcha
<!---
Example of how to include the dsp_form_protect.cfm file which displays
the recaptcha if you have the site key and secret set in site settings.
--->
<div class="form-group<cfif listfindnocase(ErrorFields, "recaptcha", ";")> has-error</cfif>">
<div class="col-sm-12">
#m.dspObject_include(thefile='form/dsp_form_protect.cfm')#
<cfif listfindnocase(ErrorFields,"recaptcha",";")><span id="helpBlock" class="help-block">#Errors.recaptcha#</span></cfif>
</div>
@bowler865
bowler865 / mura-json-api.cfm
Created October 29, 2018 15:01 — forked from stevewithington/mura-json-api.cfm
Mura CMS: JSON API Tests & Examples
<!---
Author: Stephen J. Withington, Jr.
Notes: Place this under a temp directory within your Mura CMS root to test.
For example: http://yourdomain.com/temp/json-test.cfm
--->
<cfscript>
param name="form.endpoint" default="content/new";
param name="form.method" default="GET";
param name="form.context" default="";
param name='session.siteid' default='default';
@bowler865
bowler865 / config.xml.cfm
Created January 23, 2018 14:58
dspCustomForm
<mura name="Custom Form" contenttypes="*"></mura>