Skip to content

Instantly share code, notes, and snippets.


Jim Birch thejimbirch

View GitHub Profile
thejimbirch / breadcrumb.html.twig
Created Apr 13, 2020
Add BreadcrumbList inline in Drupal 8+ in your theme's templates.
View breadcrumb.html.twig
* @file
* Theme override for a breadcrumb trail.
* Available variables:
* - breadcrumb: Breadcrumb trail items.
{% if breadcrumb %}
thejimbirch / metatag_example.php
Created Aug 19, 2019 — forked from mortenson/metatag_example.php
OR statements in metatags...
View metatag_example.php
* Implements hook_metatags_attachments_alter().
* This function allows you to define fallback tokens in case a field is empty.
* If all fallback values are empty, the tag will be empty.
* Example: [node:field_image:medium]||[node:field_legacy_image:medium]||/fallback.png
thejimbirch / contrib
Created Jun 22, 2019 — forked from sean-e-dietrich/contrib
Contrib Command For Docksal
View contrib
if [[ -z "${NAME}" ]]; then
if [[ -d $NAME ]]; then


As a developer, I need to start with a story.

A few sentences describing the overall goals of the pull request's commits. What is the current behavior of the app? What is the updated/expected behavior with this PR? Include your acceptance critiera! If your tasks were well-written, you can probably copy/paste some of this.

Affected URL


View schema-wp-add-new-type-claim-review.php
<?php //* do not include php tag
add_filter( 'schema_wp_types', 'schema_wp_new_add_schema_type_claim_review' );
* Add ClaimReview to Schema Types options
* @since 1.0
function schema_wp_new_add_schema_type_7623456( $options ) {
thejimbirch / gist:86c6de2ae857ea8a44e1fb256b095fa9
Created Dec 20, 2017
Zoomdata Master Class Home Page Promo Content
View gist:86c6de2ae857ea8a44e1fb256b095fa9
Column 1 - Simple
<div class="h1" style="color:#000;">Zoomdata Masterclass</div>
<div class="h2" style="color:#000;">Zoomdata Master Class</div>
<p class="lead" style="color:#000;">Shorten your big data learning curve and get a jump on the competition with insights you can use from industry experts.</p>
<p><a class="btn btn-default" href="/master-class">Increase Your Big Data IQ Now!</a></p>
thejimbirch / paragraph--xeno-hero.html.twig
Created Apr 23, 2017
Partial section of Xeno Hero Drupal 8 Paragraphs Template
View paragraph--xeno-hero.html.twig
{# Prints div with classes, & content w/o img/invert/overlay/parallax fields. #}
<div{{ attributes.addClass(classes).setAttribute('data-overlay', overlay_levels).setAttribute('data-speed', parallax_speeds) }}>
{% if content.xeno_background_image|render %}
<div class="paragraph--type--xeno-hero__image">
{{ content.xeno_background_image }}
{% endif %}
{{ content|without('xeno_background_image', 'xeno_invert', 'xeno_overlay', 'xeno_parallax') }}
thejimbirch / Gruntfile-bootstrap-3.js
Last active Dec 16, 2019
Bootstrap 3 and 4 Gruntfiles with copy functions to move and rename files into a Drupal or Wordpress theme. Replace SITENAME with your site or theme name.
View Gruntfile-bootstrap-3.js
* Bootstrap's Gruntfile
* Copyright 2013-2016 Twitter, Inc.
* Licensed under MIT (
module.exports = function (grunt) {
'use strict';
thejimbirch / paragraph--carousel.html.twig
Created Oct 21, 2016
Drupal 8 Template for Bootstrap Paragraphs customized for Carousel.
View paragraph--carousel.html.twig