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
<!DOCTYPE html> | |
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]--> | |
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]--> | |
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]--> | |
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]--> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
<title></title> | |
<meta name="description" content=""> |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
<!--[if lt IE 9]> | |
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.6.2/html5shiv.js"></script> | |
<script src="//s3.amazonaws.com/nwapi/nwmatcher/nwmatcher-1.2.5-min.js"></script> | |
<script src="//html5base.googlecode.com/svn-history/r38/trunk/js/selectivizr-1.0.3b.js"></script> | |
<script src="//cdnjs.cloudflare.com/ajax/libs/respond.js/1.1.0/respond.min.js"></script> | |
<![endif]--> | |
<!-- | |
For some unknown reason no CDN seems to be offering css3-mediaqueries.js which you can grab here: | |
http://code.google.com/p/css3-mediaqueries-js/ |
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
In the template: (beware of whitespace!!) | |
{exp:stash:set parse_tags="yes" output="no" save="yes" type="snippet"} | |
{stash:recipe_entry_ids} | |
{exp:channel_ratings:top_entries channel="recipes" limit="3" backspace="1"}{rating:entry_id}|{/exp:channel_ratings:top_entries} | |
{/stash:recipe_entry_ids} | |
{/exp:stash:set} | |
Then in the wrapper embed... |
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
{!-- | |
Conditionally output up to three images in a Foundation block-grid | |
Assumptions: | |
* Channel "Pages" (pages) | |
* Custom field "cf_page_images" | |
* Addons : P&T Assets, Croxton's Stash, Switchee | |
* Assets field set to allow multiple images | |
* Template uses ZURB Foundation framework | |
* Limit is set to three images, but ZURB Foundation block-grids go up till five | |
--} |
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
{!-- PART 1 : Put the code below in the beginning of your template --} | |
{exp:stash:set parse_tags="yes" replace="no" refresh="1440"} | |
{!-- Stashing Channel Entries data example --} | |
{!-- (use as many custom fields form the channel as you need) --} | |
{exp:channel:entries channel="ENTERCHANNENAMEHERE" limit="1" disable="member_data|pagination|categories"} | |
{stash:page_title}{title}{/stash:page_title} | |
{/exp:channel:entries} | |
{!-- Stashing a custom value example --} |
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
/* Assumes you SET the necessary Stash variables FIRST, then in your template output them like so: */ | |
{!-- Recipe of the week --} | |
<h3>{gv_recipeoftheweek_{ln}}</h3> | |
{if {exp:stash:not_empty name='recipe_img' type='variable'}} | |
<a href="{title_permalink='recipes/detail'}" class="thumbframe"> | |
{exp:ed_imageresizer image="{exp:stash:get name='recipe_img'}" maxWidth="128" cropratio="1:1" alt="{exp:stash:get name='recipe_title'}" parse="inward"} | |
</a> | |
{/if} | |
<a href="{title_permalink='recipes/detail'}"><h4>{exp:stash:get name='recipe_title'}</h4></a> |