Skip to content

Instantly share code, notes, and snippets.

View sabreena's full-sized avatar

Sabreena Khursheed sabreena

View GitHub Profile
{#
/**
* @file
* Theme override to display buttons block field.
*
* Available variables:
* - attributes: HTML attributes for the containing element.
* - label_hidden: Whether to show the field label or not.
* - title_attributes: HTML attributes for the title.
* - label: The label for the field.
/**
* Implements hook_preprocess_field().
*
* Preprocess field--field-buttons-ref.html.twig.
*/
function mycustomtheme_preprocess_field__field_buttons_ref(&$variables) {
// To render block content with block.html.twig template.
if (isset($variables['items'])) {
foreach ($variables['items'] as $item) {
if (isset($item['content']['#block_content'])) {
@sabreena
sabreena / SassMeister-input-HTML.html
Last active October 18, 2016 14:01 — forked from starryeyez024/SassMeister-input-HTML.html
Generated by SassMeister.com.
<html>
<body>
<div class="region-content">
<h2 class="title">Hello World!</h2>
<div id="block-block-1" class="block">
Lorem Ipsum Uno <a href="http://www.redhat.com">Click me</a>
</div>
<div id="block-block-5" class="block">
Lorem Ipsum Dos <a href="http://www.redhat.com">Click me</a>
</div>