Skip to content

Instantly share code, notes, and snippets.

View jsieber's full-sized avatar

John Sieber jsieber

  • BlueLine Development
  • Missoula, Montana
View GitHub Profile
<!---
Place this file in your theme remote folder
--->
<cfscript>
// add the content ID of the folder you wish to loop through and turn on
itemID=''
content=$.getBean('content').loadBy(contentID=itemID);
// Only get the feed if it's a valid node
<!--- Stick this in to your theme/remote/rebuild.cfm --->
<cfset application.serviceFactory.getBean('fileManager').rebuildImageCache(siteid='YOURSITEID')>
@jsieber
jsieber / updateattributes.cfm
Created November 5, 2014 20:06
Update Display, Nav and Search Exclude attributes in child pages
<cfoutput>
<!--- Read out an existing node from the default site.--->
<cfset contentBean=application.contentManager.getActiveContent('59280367-A98E-4F7D-B4463B3E405054FD','default')>
<!--- Pull out a content iterator of the nodes child content (all underlying pages within a given node).--->
<cfset it=contentBean.getKidsIterator(liveOnly='false') />
<!--- The number of Items to be listed is determined by the content.getNextN() value. Its default is 10. --->
<cfset it.setPage(1)>
<!--- You can also set the start row instead of setting a page number. --->
<cfset it.setStartRow(1)>
@jsieber
jsieber / dsp_login.cfm
Created February 19, 2015 20:51
custom returnLoginCheck
<cfif variables.$.event('expired') eq true>
<div class="alert alert-error">#variables.$.rbKey('user.forgotexpired')#</div>
</cfif>
@jsieber
jsieber / dsp_folder.cfm
Last active August 29, 2015 14:24
Add Category to top of folder content listing if present for specific contentID.
<!--- Place alert about category display if showing blog category results. This is added into a custom version of dsp_Folder.cfm --->
<cfset categoryBean = variables.$.getBean('category').loadBy(categoryID='#variables.$.event('categoryID')#', siteid=variables.$.event('siteid'))>
<cfif len(categoryBean.getName()) and variables.$.content('contentId') eq "2A66AE85-77CB-407F-B3FCD352EC6F64B8">
<div class="alert alert-success">Blog posts in the "#categoryBean.getName()#" category. <a href="/resources/blog">Return</a> to the full blog.</div>
</cfif>
ucase(Concat(left(uuid(), 23), right(uuid(),12)))
@jsieber
jsieber / index.cfm
Created July 31, 2015 18:03
Delete all "link" objects under same parent in Mura CMS
<cfscript>
// This will delete all items that have a type of link under the same parent at this page. Include this to a page in the same parent with the Mura tag.
// writeDump(var=$.content('type'), abort=true);
queryService=new Query();
queryService.setSQL(
'SELECT contentID, siteid
FROM tcontent
WHERE parentID = :parentID
AND siteID = :siteID
@jsieber
jsieber / index.html
Created October 4, 2015 04:40
Light Gallery Example
$(document).ready(function() {
$("#lightGallery").justifiedGallery({
rowHeight : 150,
lastRow : 'nojustify',
margins : 10
}).on('jg.complete', function() {
$("#lightGallery").lightGallery({
startClass: '',
useLeft: true,
thumbnail: false,
@jsieber
jsieber / index.html
Created November 3, 2016 21:50
Mapzen example
<!DOCTYPE html>
<html lang="en">
<head>
<title>One Minute Map</title>
<meta charset="utf-8">
<link rel="stylesheet" href="https://mapzen.com/js/mapzen.css">
<script src="https://mapzen.com/js/mapzen.min.js"></script>
<style>
#map {
height: 100%;
@jsieber
jsieber / config.xml.cfm
Created December 20, 2016 19:29 — forked from stevewithington/config.xml.cfm
Mura CMS v7: Sample YouTube Display Object
<displayobject name="YouTube Video" contenttypes="*"/>