Skip to content

Instantly share code, notes, and snippets.

View Dan4IT's full-sized avatar

Daniel Jansen Dan4IT

View GitHub Profile
@Dan4IT
Dan4IT / backstretch_gallery.cfm
Last active August 29, 2015 14:19
Mura Backstretch Gallery
@Dan4IT
Dan4IT / html_head.cfm
Created April 20, 2015 15:21
Learning About LESS Preprocessors
<link rel="stylesheet" href="#$.siteConfig('themeAssetPath')#/css/theme/theme.less">
<!--- LESS CDN --->
<script src="http://cdnjs.cloudflare.com/ajax/libs/less.js/2.5.0/less.min.js"></script>
@Dan4IT
Dan4IT / contentRenderer.cfc
Created April 20, 2015 15:52
dspGist in contentRenderer.cfc for Mura
<cffunction name="dspGist" output="false">
<cfargument name="GistURL" type="string">
<cfsavecontent variable="retGist">
<cfoutput><script src="#GistURL#"></script></cfoutput>
</cfsavecontent>
<cfreturn retGist>
</cffunction>
@Dan4IT
Dan4IT / comment_count.html
Last active August 29, 2015 14:20
How to Add Disqus to a Site
<script type="text/javascript">
/* * * CONFIGURATION VARIABLES * * */
var disqus_shortname = 'your-unique-disqus-url';
/* * * DON'T EDIT BELOW THIS LINE * * */
(function () {
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
s.src = '//' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
@Dan4IT
Dan4IT / kids_iterator.cfm
Created May 1, 2015 08:00
Mura Kids Iterator
<h2 class="page-header">What's On</h2>
<!--- Pull out a content iterator of the nodes child content.--->
<cfset it=$.getBean('content').loadBy(contentID='contentIDHere',siteID=event.getValue('siteID')).getKidsIterator()>
<!--- The number of Items to be listed is determined by the content.getNextN() value. It's default is 10. --->
<!---<cfset it.setPage(1)>--->
<cfset it.setNextN(5)>
<!--- You can also set the start row instead of setting a page number. --->
<!---<cfset it.setStartRow(1)>--->
@Dan4IT
Dan4IT / agents_iterator.cfm
Last active August 29, 2015 14:20
Mura - AgentsIterator
<!--- Pull out a content iterator of the nodes child content.--->
<cfset it=$.getBean('content').loadBy(contentID='AgentsPageContentID',siteID=event.getValue('siteID')).getKidsIterator()>
<!--- The number of Items to be listed is determined by the content.getNextN() value. It's default is 10. --->
<!---<cfset it.setPage(1)>--->
<cfset it.setNextN(10)>
<!--- You can also set the start row instead of setting a page number. --->
<!---<cfset it.setStartRow(1)>--->
<!---<cfloop from="1" to="#it.pageCount()#" index="p">
@Dan4IT
Dan4IT / equal_height_cols.htm
Created May 5, 2015 10:54
Bootstrap 3 - Equal Height Cols
<div class="row table-row">
<div class="col-md-4">This column is super duper long and there for it'll appear taller than the rest on devices larger than 768px. More blah blah blah blah blah blah blah blah blah blah blah blah blah blah herp derp.</div>
<div class="col-md-4">.col-md-4</div>
<div class="col-md-4">.col-md-4</div>
</div>
@Dan4IT
Dan4IT / templatevars.cfm
Last active January 17, 2016 01:11
Mura Template Variables
#$.siteConfig('themeAssetPath')#
#$.siteConfig('assetPath')#
<cfdump var="#$.siteConfig().getAllValues()#">
#$.siteConfig('domain')#
<cfdump var="#$.content().getAllValues()#">
#$.content('metaKeywords')#
<cfif len($.siteConfig('contactname'))>#$.siteConfig('contactname')#</cfif>
@Dan4IT
Dan4IT / featured_pages_iterator.cfm
Created August 16, 2015 05:55
Mura - Featured Pages Iterator
@Dan4IT
Dan4IT / slider.cfm
Created August 16, 2015 05:56
Mura - Unify Slider
<cfoutput>
<!--=== Slider ===-->
<div class="slider-inner">
<div id="da-slider" class="da-slider">
<cfset it=$.getBean('feed').loadBy(name='Slideshow').getIterator()>
<cfloop condition="it.hasNext()">