Skip to content

Instantly share code, notes, and snippets.

public function entry_submission_end() {
// get all structure listing entries
$listings_result = $this->EE->db->get('structure_listings');
// get all structure page entries
$pages_result = $this->EE->db->get('structure');
// get all transcribed entries
$transcribed_result = $this->EE->db->get('transcribe_entries_languages');
# Varnish 4.0 file for our Craft CMS projects
# Based on https://github.com/mattiasgeniar/varnish-4.0-configuration-templates/blob/master/default.vcl
#
# This is still work in progress, comments appreciated.
vcl 4.0;
import std;
import directors;
@aelvan
aelvan / macro.twig
Created September 23, 2015 15:07
Twig macro for creating a srcset string in Craft
{% macro getSrcSet(image, sizes, upscale) %}
{%- spaceless %}
{% set sizesOut = [] %}
{% set allowScaleLarger = upscale | default(false) %}
{# loop over sizes parameter and generate transforms #}
{% for size in sizes %}
{%- spaceless %}
{% set currentTransform = {} %}