Skip to content

Instantly share code, notes, and snippets.

@qbmarketing
qbmarketing / interior wrapper template
Created August 13, 2013 18:47
Current EE template partials approach. The idea is this: each template group has a "pages" channel (just using regular EE entries). The custom field group for "pages" is shared across each template group's pages channel. Within that group, there is a body, list after, and extended body field (along with some SEO fields). The "list after" is a se…
{sn_doc_open}
<div class="row">
<div class="large-9 columns main-content-column">
{exp:stash:get_list name="entry_details" limit="1"}
<h1>{entry_title}</h1>
{entry_body}
{/exp:stash:get_list}
@qbmarketing
qbmarketing / gist:5084127
Created March 4, 2013 17:58
list of regions with map for each
{exp:channel:entries channel="regions" orderby="regions_reorder" sort="asc" dynamic="no" disable="categories|member_data|pagination"}
<div class="row">
<div class="eight columns">
<h3>{title}</h3>
<p>List Navigator offices within in this region</p>
</div>
<div class="four columns">
{exp:ifelse parse="inward"}
{if count != "1"}
{exp:gmap:init id="map_{entry_id}" class="gmap" style="width:100%;height:200px" script_tag="false"}
@qbmarketing
qbmarketing / gist:5083140
Created March 4, 2013 15:43
mapping the offices
{exp:gmap:init id="map" scrollwheel="false" center="halifax, ns" style="width:100%; height:500px; margin-bottom: 20px; border: 1px solid #e1e1e1;"}
{exp:channel:entries channel="navigators" limit="50" orderby="navigators_reorder" sort="asc" disable="member_data|pagination|categories|category_fields" dynamic="no"}
{related_entries id="navigators_rda_office"}
{exp:gmap:marker id="map" latitude="{offices_latitude}" longitude="{offices_longitude}" clustering="true"}
{title} / {offices_latitude} / {offices_longitude}
{/exp:gmap:marker}
@qbmarketing
qbmarketing / gist:5068167
Created March 1, 2013 21:56
current htaccess file for eecms
<IfModule mod_rewrite.c>
# Enable Rewrite Engine
# ------------------------------
RewriteEngine On
RewriteBase /
# Redirect www Requests
# ------------------------------
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
@qbmarketing
qbmarketing / gist:4127411
Created November 21, 2012 20:22
copying fields in my form
Taking your advice to do it in jQuery, this is what I NOW have above the form:
<script type="text/javascript">
$(document).ready(function(){
$("input#same").click(function(){
if ($("input#same").is(':checked'))
{
// Checked, copy values
$("input#first_name").val($("input#order_first_name").val());
$("input#last_name").val($("input#order_last_name").val());
{exp:transcribe:language_links}
{languages}
{if current == "en"}put your english images here{/if}
{if current == "fr"}put your french images here{/if}
{if current == "sp"}put your spanish images here{/if}
{/languages}
{/exp:transcribe:language_links}
@qbmarketing
qbmarketing / gist:3056280
Created July 5, 2012 20:38
Query for year list
{exp:query sql="SELECT DISTINCT cf_statements_sort_date FROM exp_channel_data WHERE channel_id = 53 AND field_id_291 = '{user_language}' ORDER BY cf_statements_sort_date DESC"}
<li><a href="{path='{segment_1}/{segment_2}/{cf_statements_order_date format="%Y"}'}">{cf_statements_order_date format="%Y"}</a></li>
{/exp:query}
@qbmarketing
qbmarketing / gist:2937792
Created June 15, 2012 17:42
In-development htaccess to remove index.php, www AND switch to https
<IfModule mod_rewrite.c>
# Enable Rewrite Engine
# ------------------------------
RewriteEngine On
RewriteBase /
# Redirect www Requests
# ------------------------------
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
@qbmarketing
qbmarketing / gist:2937763
Created June 15, 2012 17:36
my usual htaccess file
<IfModule mod_rewrite.c>
# Enable Rewrite Engine
# ------------------------------
RewriteEngine On
RewriteBase /
# Redirect www Requests
# ------------------------------
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]