Skip to content

Instantly share code, notes, and snippets.

View stevewithington's full-sized avatar
⛑️
solving problems

Steve Withington stevewithington

⛑️
solving problems
View GitHub Profile
@stevewithington
stevewithington / dsp_latest_blog.cfm
Last active May 8, 2017 13:00
Mura CMS Training : ZeroFour : Custom files used for Front End Developer training.
<cfscript>
sectionFilename = 'blog';
// feed setup
feed = $.getBean('feed').setMaxItems(3).setSortBy('releaseDate').setSortDiretion('desc');
// pull only from the desired section
cBean = $.getBean('content').loadBy(filename=sectionFilename);
if ( !cBean.getIsNew() ) {
feed.addParam(
relationship='AND'
@stevewithington
stevewithington / muraRelatedContent.cfm
Last active May 7, 2020 08:33
Mura CMS : Related Content Iterators and outputting extended attributes
<cfoutput>
<cfscript>
// Content Bean of the Section of the site to narrow feed down to
cBean = $.getBean('content').loadBy(title='Blog');
// Feed Bean
fBean = $.getBean('feed');
fBean.addParam(
relationship='and'
@stevewithington
stevewithington / muraExtendedAttributes.cfm
Last active December 14, 2023 10:42
Mura CMS : In version 6.1, you can now obtain a Content Bean's extended attributes as a struct, and even pass in the Extend Set Name to get specific sets of extended attributes.
<cfoutput>
<cfscript>
// Access all of the current content bean's extended attributes
$.content().getExtendedAttributes();
// Access a specific Extend Set's attributes of the current content bean
$.content().getExtendedAttributes(name='Your Extend Set Name Goes Here');
// Access a query/recordset of the current content bean's extended attributes
$.content().getExtendedAttributesQuery();
@stevewithington
stevewithington / muraCustomCalendarLinks.cfm
Last active December 29, 2016 15:31
Mura CMS : This is an example of how you could modify the link output of a Mura CMS calendar. This example adds the start and end times to each calendar event.
@stevewithington
stevewithington / muraCustomCKFinder.cfm
Last active January 31, 2022 17:00
Mura CMS : Example of how to create a custom instance of CKEditor with CKFinder in Mura CMS.
<!---
Form more information on configuration of CKFinder, visit:
http://docs.cksource.com/ckfinder_2.x_api/symbols/CKFinder.html#.setupCKEditor
--->
<cfoutput>
<form>
<label for="yourTextAreaID">Your Message</label>
<textarea id="yourTextAreaID" name="frm-message" class="htmlEditor">
</textarea>
</form>
@stevewithington
stevewithington / muraRequiredSummary.cfm
Created November 15, 2013 04:21
Mura CMS : This is an example of how to make the Summary field a required field. You could use this example to make pretty much any other field, including extended attributes, required as well.
<cfscript>
// Drop this in your Site or Theme eventHandler.cfc
public any function onBeforeContentSave($) {
// reference to the newBean
var newBean = arguments.$.event('newBean');
// reference to the original contentBean
var oldBean = arguments.$.event('contentBean');
// example on how to create some errors
var error = '';
@stevewithington
stevewithington / file.cfm
Last active December 29, 2015 03:29
Mura CMS : how to add jQuery UI datepicker to a form field.
<cfoutput>
<!--- place this snippet wherever you want your form to show up --->
#$.dspThemeInclude('display_objects/sample_form.cfm')#
</cfoutput>
@stevewithington
stevewithington / muraSourceImage.cfm
Created November 26, 2013 21:15
Mura CMS : If you're attempting to store "source" images in your Mura CMS, then you will want to modify your /config/settings.ini.cfm file. Then, you may also want to customize the default Gallery output and add a link to download the "Source" image.
<!--- Add this to your /config/settings.ini.cfm --->
maxsourceimagewidth=99999
<!---
As long as the source image width is less than the value (in pixels) entered above,
then the source image will NOT be modified at all
--->
<!---
Then, you will probably want to copy the '/display_objects/gallery/' directory,
@stevewithington
stevewithington / muraCustomGallery.cfm
Last active December 30, 2015 01:09
Mura CMS : This is an example of creating a custom Gallery in Mura CMS.
<!---
1) Create a directory called 'gallery' under either:
a) /{SiteID}/includes/display_objects/custom/gallery/
OR
b) /{SiteID}/includes/themes/{ThemeName}/display_objects/gallery/
2) Add an index.cfm file to the above directory, and then place this code in it.
--->
<cfscript>
$.loadShadowboxJS();
@stevewithington
stevewithington / muraColumnizeFolderContent1.cfm
Last active December 30, 2015 12:49
Mura CMS : This example shows how you could columnize Folder content quickly, and easily.
<!---
Drop this into your config.xml.cfm file, then reload the application
to create a new Folder/Columns content type
--->
<extension type="Folder" subType="Columns">
<attributeset name="Column Settings" container="Basic">
<attribute
name="columnCount"
label="# Columns"
hint="Select the number of columns you wish to split the body area into."