Skip to content

Instantly share code, notes, and snippets.

@neilkinnish
neilkinnish / about.json
Last active August 29, 2015 14:05
Example modules in Mixture, passing data to a reusable module....
{
"meta": {
"title": "About Us",
"subtitle": "Why we're different",
"description": "<p>Lorem ipsum nibh convallis malesuada nam pulvinar velit pulvinar dolor ante.</p><p>Sed sollicitudin id. Ornare ut laoreet morbi eros nibh tincidunt vitae metus. Consequat placerat lacinia eu at arcu. Mollis metus consectetuer blandit quisque commodo donec velit tincidunt vivamus nunc bibendum. Eu adipiscing tempor praesent aliquam. Sagittis pellentesque pretium nostra pellentesque sollicitudin.</p>",
"logo": {
"name": "Text for logo",
"image": "logo.jpg"
}
}
@neilkinnish
neilkinnish / gist:27daa4e2c7354762f7bd
Created August 1, 2014 19:26
Example of what I mean
Instead of this...
{{ i | append: "-750x510.jpg" | asset_url | image_tag }}
Do this...
{% capture newImg %}{{ i | append: "-750x510.jpg" }}{% endcapture %}
{{ newImg | asset_url | image_tag }}
Layout...
{% block vars %}{% endblock %}
<!doctype html>
<html lang="en" class="no-js">
<head>
<meta charset="utf-8">
<title>{{ pageTitle }}</title>
</head>
<body>
/*
Standard way you can change title based upon collection page, keep in mind that the collections yaml meta becomes available
to it's layout file under the model namespace.
model.title will be pulled from the collections page yaml meta
*/
<!doctype html>
<html lang="en" class="no-js">
<head>
{
"debug": false,
"lintScripts": false,
"preprocessorLocations": "/_themes/denali/css/",
"preprocessorScriptOutput": null,
"preprocessorStyleOutput": null,
"projectName": "statamic 1.6.4",
"projectDescription": "statamic original",
"publishedId": null,
"serverHostname": null,