This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{!-- Stash page caching https://github.com/croxton/Stash/wiki/Caching --} | |
{exp:stash:cache bundle="news"} | |
{!-- layout used --} | |
{stash:embed name="layouts:page"} | |
{exp:channel:entries | |
channel="news" | |
status="open" | |
disable="member_data|pagination" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{!-- | |
I have a complex template, fully cached. | |
The only thing I don't want to cache is a list of random testimonials | |
that has to change every time the page is loaded. | |
*** | |
Some things I would like to understand, pretty please |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* =Clearing floats without markup | |
To be combined with a Paul Irish approach of ie specific styles | |
<http://paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/> | |
---------------------------------*/ | |
.group:after { | |
content: "."; | |
display: block; | |
height: 0; | |
clear: both; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function(){ | |
// colorbox | |
if ($('#modal').length > 0) { | |
var modalConfig = { | |
inline : true, | |
href : "#modal", | |
opacity : .75, | |
onLoad:function(){ | |
$('#modal').css('display','block'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{exp:channel:entries channel="news"} | |
{if '{switch="one|two|three"}' == "one"}<div class="row">{/if} | |
... something ... | |
{if '{switch="one|two|three"}' == "three" || count == total_results}</div>{/if} | |
{/exp:channel:entries} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"theme": "Soda Dark.sublime-theme", | |
"bold_folder_labels": true, | |
"highlight_modified_tabs": true, | |
"soda_classic_tabs": true, | |
"highlight_modified_tabs": true, | |
"color_scheme": "Packages/User/themes/Monokai.tmTheme", | |
"font_face": "Inconsolata", | |
"font_size": 17, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
Using this code in an embed, passing the father entry_id as {embed:myentryid} | |
This works natively but as soon as I add ifelse, it breaks | |
Could stash value of playa conditionals but rather avoid it if possible | |
Have tried multiple ways of quoting things | |
{if "{exp:playa:total_children entry_id='{embed:myentryid}' channel='projects|news|pressreleases|documents' status='open'}" != "0"} | |
{if {exp:playa:total_children entry_id="{embed:myentryid}" channel="projects|news|pressreleases|documents" status="open"}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{!-- Wrapper template --} | |
{embed="wrappers/page_full_width"} | |
{!-- Meta data --} | |
{exp:stash:set name="meta_title"}Our projects{/exp:stash:set} | |
{exp:stash:set name="meta_description"}Projects of the International Polar Foundation{/exp:stash:set} | |
{!-- Navigation --} | |
{exp:stash:set name="nav_current"}projects{/exp:stash:set} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. don't use these rules in your .htaccess if using the exclude method, they prevent safecracker forms from submitting properly. Sorry I forgot about thios. | |
# Add a trailing slash to paths without an extension | |
# ------------------------------------------------- | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5}|/)$ | |
RewriteRule ^(.*)$ $1/ [L,R=301] | |
OR add a rule not to add a trailing slash for POST requests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// --- | |
// Sass (v3.2.9) | |
// --- | |
@mixin respond-to($queries...) { | |
$length: length($queries); | |
@for $i from 1 through $length{ | |
@if $i % 2 == 1 { | |
@media screen and (min-width: nth($queries, $i)) { |
OlderNewer