Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

drupal 8 check if current page is node

$node = Drupal::routeMatch()->getParameter('node');
if ($node instanceof Drupal
odeNodeInterface) {
  // It's a node!
}
 
PREVIOUS NEXT
Tagged: #drupal #check #current #page #node
ADD COMMENT
Topic
Name
6+5 =