Linux installation notes (tested under Ubuntu 14.04LTS/12.04LTS), assuming VirtualBox is already installed on host.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Drupal\outline_design_system\Plugin\Preprocess\Block; | |
/** | |
* Highlight CTA block preprocess. | |
* | |
* @Preprocess( | |
* id = "outline_design_system.preprocess.block.highlight_cta", | |
* hook = "block__highlight_cta" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Requirements: | |
# 1. How to install composer: https://getcomposer.org/ | |
# 2. How to install DDEV: https://ddev.readthedocs.io/en/stable/ | |
$ composer create-project drupal/recommended-project d8maps | |
$ cd d8maps | |
$ ddev config | |
$ ddev start | |
$ ddev exec drush site-install --account-name=admin --account-pass=admin | |
$ composer require drupal/geolocation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function THEME_preprocess_html(&$variables) { | |
if ($variables['node_type'] == 'page') { | |
$node_id = \Drupal::routeMatch()->getRawParameter('node'); | |
$node = Node::load($node_id); | |
if ($term = $node->get('field_page_type')->entity) { | |
$term_name = $term->get('name')->getString(); | |
switch ($term_name) { | |
case 'My term': | |
$variables['page_type'] = $term_name; | |
break; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% set facet_config = { | |
'show_title': false, | |
'exclude_empty_facets': false, | |
'facets_to_include': { | |
'facet_block:myfacet' : 'facet_block:myfacet' | |
} | |
} | |
%} | |
{{ drupal_block('facets_block', facet_config) }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Given /^(?:|I )am on "(?P<page>[^"]+)"$/ | |
Given /^(?:|I )am on (?:|the )homepage$/ | |
Given :type content: | |
Given :vocabulary terms: | |
Given I am an anonymous user | |
Given I am at :path | |
Given I am logged in as :name | |
Given I am logged in as a user with the :permissions permission(s) | |
Given I am logged in as a user with the :role role(s) | |
Given I am logged in as a user with the :role role(s) and I have the following fields: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+Scenario: Build the default display for the basic page content type | |
+ Given I am an anonymous user | |
+ And I am viewing an "Program affiliation" term with the name "Test Program Term" | |
+ And I am viewing an "Story series" term with the name "Test Story Series Term" | |
+ And I am viewing an "Topics" term with the name "Test Topics Term" | |
+ And I am viewing a "page" content: | |
+ | title | Test Page | | |
+ | body | Test body text. | | |
+ | field_program_affiliation | Test Program Term | | |
+ | field_topics | Test Topics Term | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// client/generateForm/test.jsx | |
import React, { PropTypes } from 'react'; | |
import $ from 'jquery'; | |
import { Tree, Tooltip } from 'antd'; | |
const TreeNode = Tree.TreeNode; | |
const x = 3; | |
const y = 2; |