Skip to content

Instantly share code, notes, and snippets.

View JonasEriksson's full-sized avatar

Jonas JonasEriksson

View GitHub Profile
@JonasEriksson
JonasEriksson / Code Snippets
Created January 17, 2016 01:13 — forked from ronnieduke/Code Snippets
Mura Code Snippets
=============================
Content Image
=============================
<img src="#$.content().getImageURL(size='large')#" />
=============================
Extended Attribute Image
=============================
<!--- First, create an extended attribute with the type of 'File' --->
<img src="#$.createHREFForImage(filename=$.content('myExtAttribute'))#" />
@JonasEriksson
JonasEriksson / extendedAttributes.cfm
Created January 17, 2016 01:13 — forked from Dan4IT/extendedAttributes.cfm
Mura Extended Attributes
<!--- There are many ways you can display extended attributes. The most common way to display the value of an attribute is to use the content bean from the event upon rendering and ask for the attribute. This can be done by using the below code: --->
<cfoutput>#$.content( {attributeName} )#</cfoutput>
<cfoutput>#$.content('productPrice')#</cfoutput>
[mura]$.content('productPrice')[/mura]
<!--- Display Extended Attribute Image, including custom image size - within Iterator --->
<img alt="#sub1.getMenuTitle()#" class="img-responsive" src="#$.getURLForImage(sub1.getfilethumbnail(size = 'standardimage'))#">
<!--- Method on displaying Mura extended attribute images, including custom image sizes --->
<!--- Assuming you've created an extended attribute 'File' type called 'extAttributeImage' --->
@JonasEriksson
JonasEriksson / Foundation6 - headers
Created January 20, 2016 22:25
Foundation6 headers - Avoid skipping heading levels when structuring your document, as it confuses screen readers. For example, after using an <h2> in your code, the next heading used should be either <h2> or <h3>. If you need a heading to look bigger or smaller to match a specific style, use CSS to override the default size.
<h1>h1. This is a very large header.</h1>
<h2>h2. This is a large header.</h2>
<h3>h3. This is a medium header.</h3>
<h4>h4. This is a moderate header.</h4>
<h5>h5. This is a small header.</h5>
<h6>h6. This is a tiny header.</h6>
<!--
<!--- JS - this goes into the html footer --->
<script>
$(document).ready(function() {
function recalculate() {
var sum = 0;
$("input[type=checkbox]:checked").each(function() {
sum += parseInt($(this).attr("optionpricelocalcurrency"));
});
@JonasEriksson
JonasEriksson / config.xml.cfm
Created April 16, 2016 09:49 — forked from stevewithington/config.xml.cfm
Mura CMS : Example of how to create a Frequently Asked Questions (FAQ) area/section with Mura CMS and Bootstrap3 markup.
<!--
1) Drop this in your theme /{SiteID}/includes/themes/{Theme}/config.xml.cfm
-->
<theme>
<extensions>
<extension type="Folder" subType="FAQ" availableSubTypes="Page/Question" iconClass="icon-question-sign">
</extension>
<extension type="Page" subType="Question" iconClass="icon-question" hasSummary="0" hasBody="0" hasAssocFile="0">
</extension>
<cfoutput>
<!-- start about me section -->
<div class="container-fluid">
<section class="section-main" id="aboutme">
<div class="row">
<!-- start left column with large round image based on square image input -->
<div class="col-sm-5">
<img src="#$.siteConfig('themeAssetPath')#/images/about-me/my_pic.jpg" class="img-responsive img-circle">
</div> <!--- /. col-sm-5 --->
<!-- /. end left column -->
@JonasEriksson
JonasEriksson / innomegacomponents_gallery_hc_images.cfm
Last active May 18, 2016 11:41
Displays three images in line filling the screen width. Useful to showcase products or services or as a very simple gallery.
@JonasEriksson
JonasEriksson / btn_floating_back-to-the-top
Created May 22, 2016 20:55
Drop anywhere to have a small button to scroll back to the top. Add an ID named top-section to something close to the top as a target. Requires MDB code and INNOMEGA core.js
<cfoutput>
<div class="fixed-action-btn smooth-scroll" style="bottom: 45px; right: 25px;">
<a href="##top-section" class="btn-floating btn-large blue">
<i class="fa fa-arrow-up"></i>
</a>
</div>
</cfoutput>
@JonasEriksson
JonasEriksson / innomega_html_foot_add_on_GoogleMap_Coordinates
Last active May 24, 2016 11:09
Script for Google Map coordinates based on Mura CMS Extended Data for Site Settings.
<!--- Requires three Extended Attributes on Site/Default: GoogleMapsZoomFactor,GPSPositionLongitude,GPSPositionLatitude. --->
<!--- To get the coordinates, simply select a point on Google Maps and right-click "What's here" to get the Coordinates --->
<!--- for a place. Then chose the Zoom Factor that suits the map. Enter those values in Edit Site -> Extended Attributes --->
<!--- place this in a column in the contact form or whereever the map should be shown --->
<!-- Map container -->
<div id="map-container" class="z-depth-1 wow fadeInUp" style="height: 300px"></div>
<!-- /.Map-container -->
<!--- place code below in the footer just above the body end tag --->
@JonasEriksson
JonasEriksson / mk800-hideP1
Last active June 6, 2016 16:21
If loopcount is 1 and "parallel" is set to 1, hide the current row.
<cfif session.goparallel IS 1 AND i IS 1>
hidden
</cfif>