Created
August 9, 2017 02:03
-
-
Save ahgood/137728e3772df4c7785b85329a64ee8f to your computer and use it in GitHub Desktop.
This file contains hidden or 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
//Disable cache | |
//https://www.drupal.org/node/2598914 | |
//https://www.drupal.org/project/devel | |
//Update Drupal Core | |
//https://www.drupal.org/node/2550801 | |
drush pm-update drupal | |
//Get all taxonomy | |
//Sites/devdesktop/drupal-8.3.5/core/themes/bartik/bartik.theme | |
function bartik_preprocess_page(&$variables) { | |
$name = ''; | |
$terms = \Drupal::entityTypeManager()->getStorage('taxonomy_term')->loadMultiple(); | |
foreach ($terms as $term) { | |
$tid = $term->id(); | |
$vid = $term->getVocabularyId(); | |
$name .= $term->getName(); | |
} | |
$variables['taxo'] = $name . 'test'; | |
$variables['tids'] = implode(" ", \Drupal::entityQuery('taxonomy_term')->execute()); | |
} | |
//Sites/devdesktop/drupal-8.3.5/core/themes/bartik/templates/page.html.twig | |
{{ taxo }} | {{ tids }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment