Import instagram posts as nodes automatically with the instagram importer module for drupal 8 & 9.


Nov 13, 2019 in Drupal 8, Snippets

Short snippet that shows how to get url parameters in drupal 8. Where in drupal 7 you would have to do some $_GET or work with args(0), you now have a clean function to do this.

$tag = \Drupal::request()->query->get('tag'); 

// Then you can proceed with 
if($tag) {