Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

drupal 8 get page node

// Get page node.
$node = Drupal::routeMatch()->getParameter('node');

// Get page entity.
$params = Drupal::routeMatch()->getParameters()->all();
$entity = reset($params);
Source by drupal.stackexchange.com #
 
PREVIOUS NEXT
Tagged: #drupal #page #node
ADD COMMENT
Topic
Name
8+8 =