Skip to content

Instantly share code, notes, and snippets.

View snide's full-sized avatar
🐢
Steady, constant work always wins.

Dave Snider snide

🐢
Steady, constant work always wins.
View GitHub Profile
Let's say you have two relations to your item, actors and directors, related to movies. On your movie page you could do this...
{% set crew = merge(item.actors, item.directors) %}
{% for crew in crew|sort('date_published', true) %}
{{ crew.name }}
{% endfor %}
npm WARN unmet dependency /Users/snide/code/wh/webhook-cms/node_modules/bower requires request@'~2.27.0' but will load
npm WARN unmet dependency /Users/snide/code/wh/webhook-cms/node_modules/request,
npm WARN unmet dependency which is version 2.33.0
npm WARN unmet dependency /Users/snide/code/wh/webhook-cms/node_modules/bower/node_modules/bower-registry-client requires request@'~2.27.0' but will load
npm WARN unmet dependency /Users/snide/code/wh/webhook-cms/node_modules/request,
npm WARN unmet dependency which is version 2.33.0
npm WARN unmet dependency /Users/snide/code/wh/webhook-cms/node_modules/bower/node_modules/update-notifier requires request@'~2.27.0' but will load
npm WARN unmet dependency /Users/snide/code/wh/webhook-cms/node_modules/request,
npm WARN unmet dependency which is version 2.33.0
npm ERR! invalid: [email protected] /Users/snide/code/wh/webhook-cms/node_modules/request
{# ------------------------------------------------------- #}
{# INDIVIDUAL VIEW FOR EACH games #}
{# This page can use any data from http:localhost:2000/cms/#/form/games/ #}
{# Webhook uses the SWIG.js (like Djagno/Twig) templating system. Their documentation is here: #}
{# http://paularmstrong.github.io/swig/docs/tags/ #}
{# Learn about calling data into Webhook pages here: #}
{# http://www.webhook.com/docs/template-rules-and-filters/ #}
{# ------------------------------------------------------- #}
{# Confused what extends and blocks do? Watch a primer: #}
{# http://www.webhook.com/docs/template-inheritance-blocks/ #}
.video-wrap
max-width: 640px
margin: auto
+clearfix
.video
position: relative
padding-bottom: 56.25%
height: 0
.video-wrap iframe
position: absolute
{# LIST VIEW OF ALL shows #}
{# You can find a full list of variables to use on this page in your CMS. #}
{% extends "templates/partials/base.html" %}
{% block content %}
<div class="show-list">
<div class="container">
{% set shows = get('shows') %}
Form layout....
<ol>
<li>
<label>title</label>
<div>
<input>
<p class="help-block"></p>
</div>
</li>
export PATH=/Users/snide/bin:${PATH}:/usr/local/sbin
function parse_git_branch {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
export PYTHONDONTWRITEBYTECODE=1
export VIRTUALENV_USE_DISTRIBUTE=1
alias shell="python manage.py shell"
<script>
var _comscore = _comscore || [];
_comscore.push({ c1: "2", c2: "3005086" });
(function() {
var s = document.createElement("script"), el = document.getElementsByTagName("script")[0]; s.async = true;
s.src = (document.location.protocol == "https:" ? "https://sb" : "http://b") + ".scorecardresearch.com/beacon.js";
el.parentNode.insertBefore(s, el);
})();
</script>
<noscript>
{# COMSCORE #}
<script>
var _comscore = _comscore || [];
_comscore.push({ c1: "2", c2: "3005086" });
(function() {
var s = document.createElement("script"), el = document.getElementsByTagName("script")[0]; s.async = true;
s.src = (document.location.protocol == "https:" ? "https://sb" : "http://b") + ".scorecardresearch.com/beacon.js";
el.parentNode.insertBefore(s, el);
})();
</script>
{
"color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme",
"folder_exclude_patterns":
[
".svn",
".git",
".hg",
"CVS",
"*.pyc",
"*.pyo",