Skip to content

Instantly share code, notes, and snippets.


Block or report user

Report or block zenbug

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
zenbug / include-with-variables
Created Feb 27, 2019
Craft CMS Include with embedded variables
View include-with-variables
{% include "oz/emerald-city with {
"character" : "tinman"
} %}
zenbug / gist:38f0462b461487faadb254e1d493b872
Created Feb 19, 2019
Using LazySizes and the Picture element with responsive breakpoints for art-direction in Craft CMS
View gist:38f0462b461487faadb254e1d493b872
{# Assets can be an array, so we need to add .one() to the end when we only want one asset: #}
{% set theImage = %}
{# Also create variables for all other fields that are used with images: #}
{% set theImageCaption = block.caption %}
{% set theImagePosition = block.imagePosition %}
There are four image position options:
You can’t perform that action at this time.