Skip to content

Instantly share code, notes, and snippets.

@TerranRich
Created December 10, 2018 16:13
Show Gist options
  • Save TerranRich/d2612ba381228daaee9530f6ec14ff57 to your computer and use it in GitHub Desktop.
Save TerranRich/d2612ba381228daaee9530f6ec14ff57 to your computer and use it in GitHub Desktop.
Get current node ID
$variables['node_id'] = \Drupal::routeMatch()->getParameter('node')->Id();
@TerranRich
Copy link
Author

This works perfectly. Fight me on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment