Drupal 8

Documenting my findings about Drupal 8 here.
By Phil Frilling, 23 September, 2016
I was working on a new Drupal 8 site and had a new geolocation view setup to show locations on a Google map. Everything was working well, then I decided I wanted to add a new field to the node and include that field in the view. After adding the field to the view, I decided against using it and deleted the field from the node (before removing it from the view). This, in turn, deleted the entire view, which cost me a days worth of work!
By Phil Frilling, 30 August, 2016

/**
 * Implements template_preprocess_taxonomy_term().
 */
function THEME_preprocess_taxonomy_term(&$variables) {
  // Add the term name as a variable to use as a class in the twig file.
  $variables['term_name'] = $variables['term']->label();
}

Tags

By Phil Frilling, 30 August, 2016

/**
 * Implements hook_theme_suggestions_alter().
 */
function THEME_theme_suggestions_alter(&$suggestions, $variables, $hook) {
  switch ($hook) {
    case 'taxonomy_term':
      // Add a view mode suggestion for taxonomy terms.
      $suggestions[] 

Tags