Skip to content

Instantly share code, notes, and snippets.

@CNSam
CNSam / Gift.php
Last active November 6, 2015 09:44
if ( $this->getRequest()->getPost( 'age' ) ) {
$value = $this->getRequest()->getPost( 'age' );
$split_age = explode( '-', $value );
$age_array = [];
foreach($split_age as $age){
$age_array[] = array( 'finset' => array( $age ) );
}
}
@CNSam
CNSam / gulpfile.js
Created October 19, 2015 09:20
gulpfile.js
/**
* Gulp Packages
*/
// General
var gulp = require('gulp');
var fs = require('fs');
var del = require('del');
var lazypipe = require('lazypipe');
var plumber = require('gulp-plumber');
@CNSam
CNSam / EE - Assets - Index.html - If Statement Issue
Last active December 26, 2015 05:29
EE - Assets - Index.html - If Statement Issue
{exp:channel:entries channel="home"}
{embed="embeds/_header-meta" }
<!-- END HEADER INCLUDE -->
<style>
</style>
<div class="sliderContainer fullWidth clearfix">
<div id="full-width-slider" class="royalSlider rsDefault heroSlider rsMinW">
@CNSam
CNSam / jQuery - Add Shortlist Item
Created October 18, 2013 13:20
Shortlist - Add Item jQuery
$('a.shortlist_action.available').on('click', function(){
// Assign variable
thisFlag = $(this);
modal = $(thisFlag).parent().parent().find('.modal-item');
$(modal).slideToggle();
$(document).one('click', function(){
$(modal).fadeOut();
});
{paginate}
{pagination_links}
<ul>
{previous_page}
<li><a href="{pagination_url}" class="page-previous">&lt;</a></li>
{/previous_page}
{first_page}
<li><a href="{pagination_url}" class="page-first">1</a> &hellip;</li>
{/first_page}