Skip to content

Instantly share code, notes, and snippets.

@iso100
iso100 / gumby_global-columns.scss
Created Oct 15, 2013
A function for use with Gumby framework that helps calculate the % width of a column in global columns when nested inside another column
View gumby_global-columns.scss
@function global-columns($desired_cols, $container_cols, $hybrid-grid: false){
@if ($hybrid-grid == true) {
@return (100% * (columns($desired_cols, true) / columns($container_cols, true)));
}
@else {
@return (100% * (columns($desired_cols) / columns($container_cols)));
}
}
@iso100
iso100 / debugging-ce-enabled.txt
Created Jun 17, 2013
Template debugging with CE Cache enabled.
View debugging-ce-enabled.txt
(0.000014 / 14.13MB) - Begin Template Processing -
(0.000165 / 14.14MB) URI: qr-codes/gallery/custom-qr-prints
(0.000183 / 14.14MB) Path.php Template: data/detail
(0.000199 / 14.14MB) Retrieving Template
(0.000219 / 14.14MB) Retrieving Template from Database: data/detail
(0.001334 / 14.14MB) Template Found
(0.001446 / 14.15MB) Retrieving Template from File
(0.005255 / 14.46MB) Calling Extension Class/Method: Low_variables_ext/template_fetch_template
(0.008529 / 14.53MB) Calling Extension Class/Method: Ce_cache_ext/template_pre_parse
(0.010052 / 14.62MB) Calling Extension Class/Method: Stash_ext/template_fetch_template
@iso100
iso100 / debugging.txt
Created Jun 17, 2013
Debugging for stash/ce cache issue. This is with user logged in and thus CE Cache not running.
View debugging.txt
(0.000010 / 14.13MB) - Begin Template Processing -
(0.000145 / 14.14MB) URI: qr-codes/gallery/custom-qr-prints
(0.000160 / 14.14MB) Path.php Template: data/detail
(0.000174 / 14.14MB) Retrieving Template
(0.000190 / 14.14MB) Retrieving Template from Database: data/detail
(0.001371 / 14.14MB) Template Found
(0.001457 / 14.15MB) Retrieving Template from File
(0.004854 / 14.46MB) Calling Extension Class/Method: Low_variables_ext/template_fetch_template
(0.008221 / 14.53MB) Calling Extension Class/Method: Ce_cache_ext/template_pre_parse
(0.009650 / 14.62MB) Calling Extension Class/Method: Stash_ext/template_fetch_template
@iso100
iso100 / _detail.html
Created Jun 17, 2013
Wrapper for detail template
View _detail.html
<!DOCTYPE HTML>
<html lang="en-US">
<head>
{exp:seo_lite use_last_segment="yes"}
<link rel="canonical" href="http://www.pb.com/smb{structure:page:uri}" />
{sn_head}
{gv_easybox_overrides}
<style type="text/css">
{exp:stash:get name="{segment_1}-color-styles" scope="site"}
</style>
@iso100
iso100 / detail.html
Created Jun 17, 2013
Model template for detail layout.
View detail.html
{if {exp:stash:not_empty name="{segment_1}-color-styles" scope="site"}==0}
{exp:channel:entries
channel="overview"
disable="categories|member_data|pagination|trackbacks"
status="not Closed"
dynamic="no"
url_title="{segment_1}"
limit="1"
}
{exp:stash:set
@iso100
iso100 / .htaccess
Last active Dec 18, 2015
Mapinfo.com redirects
View .htaccess
php_value memory_limit 256M
php_value error_reporting 8191
php_value upload_max_filesize 20M
php_value post_max_size 20M
php_value max_execution_time 200
php_value max_input_time 200
php_value suhosin.memory_limit 256M
php_value suhosin.post.max_vars 6000
php_value suhosin.request.max_vars 6000
php_value max_input_vars 2000
@iso100
iso100 / Conditional Secondary Nav with Structure
Created May 24, 2013
Failed attempt at only rendering secondary navigation when there's nav items to display.
View Conditional Secondary Nav with Structure
{if '{structure:child_ids_for:{structure:top:entry_id}}' != ''}
<div id="secondary-nav" class="widget">
<h3>Other Pages in <a href="{structure:top:uri}">{structure:top:title}</a>:</h3>
{exp:structure:nav
current_class="active"
start_from="/{segment_1}"
include_ul="yes"
}
</div>
{/if}
@iso100
iso100 / .htaccess
Created May 4, 2013
Remove trailing slash from URLs
View .htaccess
# Remove Trailing Slash
# ------------------------------
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} (.*)$
RewriteRule ^(.+)/$ http://www.yourdomain.com/$1 [R=301,NC,L]
@iso100
iso100 / statamic_feed_template.html
Created May 1, 2013
A quick rss feed template for Statamic.
View statamic_feed_template.html
<channel>
<title><![CDATA[{{ folder }}]]></title>
<link>{{ _site_url }}/{{ folder }}</link>
<description>{{ _site_name }} {{ folder }}</description>
<dc:language>en-us</dc:language>
<dc:creator>{{ contact_email }}</dc:creator>
<dc:rights>Copyright {{ current_date format='Y' }}</dc:rights>
<dc:date>{{ current_date format="Y-m-d\TH:i:s\Z" }}</dc:date>
<admin:generatorAgent rdf:resource="http://statamic.com/" />
@iso100
iso100 / mod.structure.php
Created Apr 24, 2013
Ian's mods to breadcrumbs allowing a custom last class to support Foundation 4
View mod.structure.php
/** -------------------------------------
/** Create a Breadcrumb Trail
/** -------------------------------------*/
function breadcrumb()
{
$site_pages = $this->sql->get_site_pages();
if ( ! $site_pages)
return FALSE;